Returns an array of System.Reflection.MemberInfo objects that reflect the public members that have the specified name and are defined in the type represented by the current instance.
- name
- A string containing the name of the members to be returned.
An array of System.Reflection.MemberInfo objects that reflect the public members that are named name and are defined in the type represented by the current instance. If no public members with the specified name are defined in the type represented by the current instance, returns an empty array.
Type Reason ArgumentNullException name is null.
This version of Type.GetMember(string) is equivalent to Type.GetMember(string)( name, System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public ).
The search for name is case-sensitive.
If the current instance represents a generic type, this method returns the System.Reflection.MemberInfo with the type parameters replaced by the appropriate type arguments.
If the current instance represents an unassigned type parameter of a generic type or method, this method searches the members of the class constraint, or the members of object if there is no class constraint; the members of all interface constraints; and the members of any interfaces inherited from class or interface constraints.
Note: The name parameter cannot include type arguments.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0