AliasAttribute 類別

定義

套用至類型或方法時,指定可用來識別該類型或方法的已知名稱。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct)]
public sealed class AliasAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true)]
public sealed class AliasAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct)>]
type AliasAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true)>]
type AliasAttribute = class
    inherit Attribute
Public NotInheritable Class AliasAttribute
Inherits Attribute
繼承
AliasAttribute
屬性

備註

如果是類型,別名必須是全域唯一的。 在方法的情況下,別名必須是唯一的宣告類型。

建構函式

AliasAttribute(String)

初始化 AliasAttribute 類別的新執行個體。

屬性

Alias

取得別名。

適用於

另請參閱