TypedReference的实际用途用途、实际、TypedReference

2023-09-03 01:53:10 作者:全网最帅

有没有的TypedReference结构,你实际上在现实code使用?

修改:在.NET框架中使用它们 Console.WriteLine String.Concat 它构建一个 __参数列表的参数数组并把它传递到正常 PARAMS 超载。为什么这些重载存在?

解决方案   

有没有在TypedReference结构,你实际上在现实code使用的任何实际用途?

是的。我会使用他们,如果我需要用C风格的可变参数方法的互操作性。

  

为什么这些重载存在?

谁喜欢用C风格的可变参数方法的互操作性的存在与呼叫者。

Are there any practical uses of the TypedReference struct that you would actually use in real code?

EDIT: The .Net framework uses them in overloads of Console.WriteLine and String.Concat which build an array from an __arglist parameter and pass it to the normal params overload. Why do these overloads exist?

解决方案 实现 至高 的真实声音传输 XLO Reference 3系列

Are there any practical uses of the TypedReference struct that you would actually use in real code?

Yes. I'd use them if I needed interoperability with C-style variadic methods.

Why do these overloads exist?

The exist for interoperability with callers who like to use C-style variadic methods.