Searches for the specified members, using the specified binding constraints.
[Visual Basic] Overloads Overridable Public Function GetMember( _ ByVal name As String, _ ByVal bindingAttr As BindingFlags _ ) As MemberInfo () [C#] public virtual MemberInfo[] GetMember( string name, BindingFlags bindingAttr ); [C++] public: virtual MemberInfo* GetMember( String* name, BindingFlags bindingAttr ) []; [JScript] public function GetMember( name : String, bindingAttr : BindingFlags ) : MemberInfo[];
-or-
zero, to conduct a case-sensitive search for public members.
An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, a null reference (in Visual Basic Nothing).
Exception Type | Condition |
---|---|
ArgumentNullException | name is a null reference (Nothing). |
SecurityException | The requested member is non-public and the caller does not have ReflectionPermission to reflect non-public members outside the current assembly. |
This method can be overridden by a derived class.
Members include properties, methods, fields, events, and so on.
This method searches the current classes and its base classes.
The following BindingFlags filter flags can be used to define which members should be included in the search:
The following BindingFlags modifier flags can be used to change how the search works:
See BindingFlags for more information.Class initializers are available through GetMember, GetMembers, FindMembers, and GetConstructors.
Type Class | Type Members | System Namespace | Type.GetMember Overload List