Επεξεργασία

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


EnumBuilder.GetMember(String, MemberTypes, BindingFlags) Method

Definition

Returns all members with the specified name, type, and binding that are declared or inherited by this type.

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

Parameters

name
String

The name of the member.

type
MemberTypes

The type of member that is to be returned.

bindingAttr
BindingFlags

This must be a bit flag from BindingFlags : InvokeMethod, NonPublic, and so on.

Returns

Returns an array of MemberInfo objects representing the public and non-public members defined on this type if nonPublic is used; otherwise, only the public members are returned.

Exceptions

This method is not currently supported in types that are not complete.

Remarks

As a workaround, to retrieve the member of a finished type, retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

Applies to