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

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。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.

適用於