Attributes in C#

前端 未结 8 721
时光说笑
时光说笑 2020-11-30 04:08

I know that C# (and .NET in general) is big on attributes. However, despite the fact I have programmed in C# for many years, I haven\'t found myself ever using them. Would s

8条回答
  •  有刺的猬
    2020-11-30 04:35

    Class Attribute definition is available here

    ClassInterfaceAttribute : Indicates the type of class interface to be generated for a class exposed to COM, if an interface is generated at all.

    ComDefaultInterfaceAttribute : Specifies a default interface to expose to COM. This class cannot be inherited.

    ComVisibleAttribute: Controls accessibility of an individual managed type or member, or of all types within an assembly, to COM.

提交回复
热议问题