TypeInfo.DeclaredConstructors 属性


获取由当前类型声明的构造函数的集合。Gets a collection of the constructors declared by the current type.

 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; }
member this.DeclaredConstructors : seq<System.Reflection.ConstructorInfo>
Public Overridable ReadOnly Property DeclaredConstructors As IEnumerable(Of ConstructorInfo)


由当前类型声明的构造函数的集合。A collection of the constructors declared by the current type.


若要筛选 DeclaredConstructors 属性的结果,请使用 LINQ 查询。To filter the results of the DeclaredConstructors property, use LINQ queries. 对于源于运行时的反射对象(例如,作为 typeof(Object)的结果),您可以使用 RuntimeReflectionExtensions 类中的方法遍历继承树。For reflection objects that originate with the runtime (for example, as the result of typeof(Object)), you can traverse the inheritance tree by using the methods in the RuntimeReflectionExtensions class. 自定义反射上下文中的对象的使用者不能使用这些方法,并且必须遍历继承树本身。Consumers of objects from customized reflection contexts cannot use these methods and must traverse the inheritance tree themselves.