c# - .net 中的 AutoClass 是什么?

标签 c# .net reflection types autoclass

我正在阅读 Inside C# ,我偶然发现了Type.IsAutoClass .

文档说

true if the string format attribute AutoClass is selected for the Type; otherwise, false.

问题是什么是 AutoClass 以及它如何影响 Type

请注意,这是学术问题,在我参与的项目中没有实际用途(据我所知)。

最佳答案

它是 TypeAttributes 的一部分枚举:

AutoClass - LPTSTR is interpreted automatically.

以及备注:

The members of this enumerator class match the CorTypeAttr enumerator as defined in the corhdr.h file.

因此,这用于互操作,即如何解释字符串常量。

顺便一提 - LPTSTR .

关于c# - .net 中的 AutoClass 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14385441/

相关文章:

c# - 解析 DataType 时 JSON 反序列化到 DataTable 问题

c# - 即使未调用引用的 DLL,是否可以加载它?

.net - 来自 Prometheus .NET 客户端库的 Metrics 实例是线程安全的吗

c# - 具有非依赖参数的构造函数注入(inject)

c# - 正则表达式不匹配任何html标签

c# - 代码没有遍历整个字典?

C++:有没有办法让这个反射宏与 IntelliSense 一起工作?

go - 如何使用 reflect.DeepEqual() 将指针的值与其类型的零值进行比较?

c# - 在 C# winform 中绘图相当慢

scala - 如何通过 Scala 反射访问默认参数值?