_Type.GetDefaultMembers _Type.GetDefaultMembers _Type.GetDefaultMembers _Type.GetDefaultMembers Method

定义

为 COM 对象提供对 GetDefaultMembers() 方法的版本无关的访问。Provides COM objects with version-independent access to the GetDefaultMembers() method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetDefaultMembers();
public System.Reflection.MemberInfo[] GetDefaultMembers ();
abstract member GetDefaultMembers : unit -> System.Reflection.MemberInfo[]
Public Function GetDefaultMembers () As MemberInfo()

返回

表示当前 MemberInfo 的所有默认成员的 Type 对象数组。An array of MemberInfo objects representing all default members of the current Type.

- 或 --or- 如果当前 MemberInfo 没有默认成员,则为 Type 类型的空数组。An empty array of type MemberInfo, if the current Type does not have default members.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetDefaultMembers方法搜索为当前定义的成员TypeDefaultMemberAttribute设置。The Type.GetDefaultMembers method searches for the members defined for the current Type whose DefaultMemberAttribute is set.

适用于