Bagikan melalui


AliasAttribute Kelas

Definisi

Saat diterapkan ke jenis atau metode, menentukan nama terkenal yang dapat digunakan untuk mengidentifikasi jenis atau metode tersebut.

[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
Warisan
AliasAttribute
Atribut

Keterangan

Dalam kasus jenis, alias harus unik secara global. Dalam kasus metode, alias harus unik untuk jenis deklarasikan.

Konstruktor

AliasAttribute(String)

Menginisialisasi instans baru kelas AliasAttribute.

Properti

Alias

Mendapatkan alias.

Berlaku untuk

Lihat juga