Discovers the attributes of a field and provides access to field metadata. The field information is obtained from metadata. FieldInfo does not have a public constructor. Objects are created by invoking either the GetFields() or GetField() method of a Type object.
Fields are variables defined in the class. Although related to fields, properties are marked explicitly in the metadata and usually have get and set routines associated with them. FieldInfo provides access to the metadata for a field within a class and provides dynamic set and get functionality for the field. The class is not loaded into memory until invoke or get is called on the object.
Object
MemberInfo
FieldInfo
[Visual Basic] MustInherit Public Class FieldInfo Inherits MemberInfo [C#] public abstract class FieldInfo : MemberInfo [C++] public __gc __abstract class FieldInfo : public MemberInfo [JScript] public abstract class FieldInfo extends MemberInfo
When Type.GetField is called, the returned FieldInfo will appear to have a ToString method; it does not. This is due to an internal private class used by Type. This matter will be made more clear in a future release.
Namespace: System.Reflection
Assembly: mscorlib.dll