Name

ComAliasNameAttribute

Synopsis

This attribute is automatically added when COM type libraries are imported into the .NET runtime. COM uses alias names for various data types (such as typedef [public] int SHOE_SIZE). When you import a COM object that uses such an alias, .NET automatically decorates each parameter, property, field, and return value with this attribute. If you need to know the name of the COM alias, use the System.Reflection API to see if this custom attribute has been attached to the parameter, property, field, or return value you are interested in.

Since .NET automatically converts COM aliases to the underlying .NET types when it imports a type library, you do not need to use this attribute for typical applications (tool developers will find this attribute useful, though).

Public NotInheritable Class ComAliasNameAttribute : Inherits Attribute
' Public Constructors
   Public Sub New( ByVal alias As String) 
' Public Instance Properties
   Public ReadOnly Property Value As String  
End Class

Hierarchy

System.ObjectSystem.Attribute ComAliasNameAttribute

Valid On

Property, Field, Parameter, ReturnValue

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.