Bagikan melalui


TypeInfo.DeclaredConstructors Properti

Definisi

Mendapatkan koleksi konstruktor yang dideklarasikan oleh jenis saat ini.

public:
 virtual property System::Collections::Generic::IEnumerable<System::Reflection::ConstructorInfo ^> ^ DeclaredConstructors { System::Collections::Generic::IEnumerable<System::Reflection::ConstructorInfo ^> ^ get(); };
public virtual System.Collections.Generic.IEnumerable<System.Reflection.ConstructorInfo> DeclaredConstructors { get; }
public virtual System.Collections.Generic.IEnumerable<System.Reflection.ConstructorInfo> DeclaredConstructors { [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)] get; }
member this.DeclaredConstructors : seq<System.Reflection.ConstructorInfo>
[<get: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)>]
member this.DeclaredConstructors : seq<System.Reflection.ConstructorInfo>
Public Overridable ReadOnly Property DeclaredConstructors As IEnumerable(Of ConstructorInfo)

Nilai Properti

Kumpulan konstruktor yang dideklarasikan oleh jenis saat ini.

Atribut

Keterangan

Untuk memfilter hasil DeclaredConstructors properti, gunakan kueri LINQ. Untuk objek refleksi yang berasal dari runtime (misalnya, sebagai hasil ), typeof(Object)Anda dapat melintasi pohon warisan dengan menggunakan metode di RuntimeReflectionExtensions kelas . Konsumen objek dari konteks refleksi yang disesuaikan tidak dapat menggunakan metode ini dan harus melintasi pohon warisan itu sendiri.

Berlaku untuk