TypeBuilder.GetMember Method (String, MemberTypes, BindingFlags)

 

Returns all the public and non-public members declared or inherited by this type, as specified.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public override MemberInfo[] GetMember(
	string name,
	MemberTypes type,
	BindingFlags bindingAttr
)

Parameters

name
Type: System.String

The name of the member.

type
Type: System.Reflection.MemberTypes

The type of the member to return.

bindingAttr
Type: System.Reflection.BindingFlags

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

Return Value

Type: System.Reflection.MemberInfo[]

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.

Exception Condition
NotSupportedException

This method is not implemented for incomplete types.

Retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: