When overridden in a derived class, returns the value of a field supported by a given object.
Namespace: System.ReflectionAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public abstract Object GetValue(
Object obj
)
Parameters
- obj
- Type: SystemObject
The object whose field value will be returned.
Return Value
Type:
ObjectAn object containing the value of the field reflected by this instance.
Exceptions Exception | Condition |
---|
TargetException | The field is non-static and obj is null. |
NotSupportedException | A field is marked literal, but the field does not have one of the accepted literal types. |
FieldAccessException | The caller does not have permission to access this field. |
ArgumentException | The method is neither declared nor inherited by the class of obj. |
See Also