Redigera

Dela via


TypeDelegator.GetMember(String, MemberTypes, BindingFlags) Method

Definition

Returns members (properties, methods, constructors, fields, events, and nested types) specified by the given name, type, and bindingAttr.

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 to get.

type
MemberTypes

A bitmask that affects the way in which the search is conducted. The value is a combination of zero or more bit flags from BindingFlags.

bindingAttr
BindingFlags

The type of members to get.

Returns

An array of type MemberInfo containing all the members of the current class and its base class meeting the specified criteria.

Exceptions

The name parameter is null.

Remarks

If bindingAttr is BindingFlags.NonPublic, all the members will be considered. If there are no matches, an empty array is returned.

Applies to