August 2003
Intermediate to advanced
928 pages
32h 1m
English
IReflect
This interface defines how
types are reflected and provides all the
relevant information about the members of a class (methods, fields,
and properties). The Get methods allow access to
these members. The methods GetField( ),
GetMethod( ), GetProperty( ),
and GetMember( ) return single members of the
specified type by name. The methods GetFields( ),
GetMethods( ), GetProperties( ), and GetMembers( ) return all of the
specified type of members contained by the class.
public interface IReflect { // Public Instance Properties public Type UnderlyingSystemType{get; } // Public Instance Methods public FieldInfo GetField(stringname, BindingFlagsbindingAttr); public FieldInfo[ ] GetFields(BindingFlagsbindingAttr); public MemberInfo[ ] GetMember(stringname, BindingFlagsbindingAttr); public MemberInfo[ ] GetMembers(BindingFlagsbindingAttr); public MethodInfo GetMethod(stringname, BindingFlagsbindingAttr); public MethodInfo GetMethod(stringname, BindingFlagsbindingAttr, Binderbinder, Type[ ]types, ParameterModifier[ ]modifiers); public MethodInfo[ ] GetMethods(BindingFlagsbindingAttr); public PropertyInfo[ ] GetProperties(BindingFlagsbindingAttr); public PropertyInfo GetProperty(stringname, BindingFlagsbindingAttr); public PropertyInfo GetProperty(stringname, BindingFlagsbindingAttr, Binderbinder, TypereturnType, Type[ ]types, ParameterModifier[ ]modifiers); public object InvokeMember(stringname, BindingFlagsinvokeAttr, Binderbinder, object