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

備註

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會搜尋定義給目前Type的成員,其DefaultMemberAttribute已設定。 Type.GetDefaultMembersThe Type.GetDefaultMembers method searches for the members defined for the current Type whose DefaultMemberAttribute is set.

適用於