Επεξεργασία

Κοινή χρήση μέσω


_Type.GetMember Method

Definition

Provides COM objects with version-independent access to the GetMember method.

Overloads

GetMember(String)

Provides COM objects with version-independent access to the GetMember(String) method.

GetMember(String, BindingFlags)

Provides COM objects with version-independent access to the GetMember(String, BindingFlags) method.

GetMember(String, MemberTypes, BindingFlags)

Provides COM objects with version-independent access to the GetMember(String, MemberTypes, BindingFlags) method.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetMember method gets the specified members of the current Type.

GetMember(String)

Provides COM objects with version-independent access to the GetMember(String) method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMember(System::String ^ name);
public System.Reflection.MemberInfo[] GetMember (string name);
abstract member GetMember : string -> System.Reflection.MemberInfo[]
Public Function GetMember (name As String) As MemberInfo()

Parameters

name
String

The String containing the name of the public members to get.

Returns

An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetMember method searches for the public members with the specified name.

Applies to

GetMember(String, BindingFlags)

Provides COM objects with version-independent access to the GetMember(String, BindingFlags) method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMember(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MemberInfo[] GetMember (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetMember : string * System.Reflection.BindingFlags -> System.Reflection.MemberInfo[]
Public Function GetMember (name As String, bindingAttr As BindingFlags) As MemberInfo()

Parameters

name
String

The String containing the name of the members to get.

bindingAttr
BindingFlags

A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

Zero, to return an empty array.

Returns

An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetMember method searches for the specified members, using the specified binding constraints.

Applies to

GetMember(String, MemberTypes, BindingFlags)

Provides COM objects with version-independent access to the GetMember(String, MemberTypes, BindingFlags) method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMember(System::String ^ name, System::Reflection::MemberTypes type, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MemberInfo[] GetMember (string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr);
abstract member GetMember : string * System.Reflection.MemberTypes * System.Reflection.BindingFlags -> System.Reflection.MemberInfo[]
Public Function GetMember (name As String, type As MemberTypes, bindingAttr As BindingFlags) As MemberInfo()

Parameters

name
String

The String containing the name of the members to get.

type
MemberTypes

The MemberTypes value to search for.

bindingAttr
BindingFlags

A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

Zero, to return an empty array.

Returns

An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetMember method searches for the specified members of the specified member type, using the specified binding constraints.

Applies to