FieldBuilder.GetValue Method

Retrieves the value of the field supported by the given object.

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


Public Overrides Function GetValue ( _
    obj As Object _
) As Object
public override Object GetValue(
    Object obj


  • obj
    Type: System.Object
    The object on which to access the field.

Return Value

Type: System.Object
An Object containing the value of the field reflected by this instance.


Exception Condition

This method is not supported.


If the field is static, the obj parameter is ignored. For non-static fields, obj should be an instance of a class that inherits or declares the field.

The return type of GetValue is Object. For example, if the field holds a Boolean primitive value, an instance of Object with the appropriate Boolean value is returned.

Version Information


Supported in: 5, 4, 3


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.