The .NET Framework has the ability to reflect and gather
metadata about types in an assembly. The Type class has several methods define
that return objects representing a property, method, etc. These objects are
suffixed with -Info and are defined in the System.Reflection namespace. For
instance, if you wanted to get properties of a class, you use GetProperties()
to get a list of properties or GetProperty() to get a specific named property.
For each object the type class has these methods defined or you can use
GetMember()/GetMembers() to get the MemberInfo objects you may be looking for.
Reflection has some capabilities to get/set values, which
help in getting/setting values for an object. You can somewhat mock a property
value because you can change it to be whatever you want to test it as. This is
the capability I build into a Reflection Mock class that made it easier to
perform logic mocking in unit tests, but is far short of an actual mock class.
See the Reflection
overview for more information.