_Type.GetDefaultMembers 方法

定义

为 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.

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

适用于