NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FieldInfo.SetValue (Object, Object, BindingFlags, Binder, CultureInfo)

When implemented by a subclass, this method sets the value of the field supported by the given object.

[Visual Basic]
Overloads MustOverride Public Sub SetValue( _
   ByVal obj As Object, _
   ByVal value As Object, _
   ByVal invokeAttr As BindingFlags, _
   ByVal binder As Binder, _
   ByVal culture As CultureInfo _
)
[C#]
public abstract void SetValue(
   object obj,
   object value,
   BindingFlags invokeAttr,
   Binder binder,
   CultureInfo culture
);
[C++]
public: virtual void SetValue(
   Object* obj,
   Object* value,
   BindingFlags invokeAttr,
   Binder* binder,
   CultureInfo* culture
) = 0;
[JScript]
public abstract function SetValue(
   obj : Object,
   value : Object,
   invokeAttr : BindingFlags,
   binder : Binder,
   culture : CultureInfo
);

Parameters

obj
The object whose field value will be set.
value
The value to assign to the field.
invokeAttr
[To be supplied.]
binder
[To be supplied.]
culture
[To be supplied.]

Remarks

This method will assign value to the field reflected by this instance on object obj. If the field is static, obj will be ignored. For non-static fields, obj should be an instance of a class that inherits or declares the field. The new value is passed as a Variant. For example, if the field's type is Boolean, an instance of Variant with the appropriate Boolean value is passed. Before setting the value, SetValue checks to see if the user has access permission.

Note   Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked via Reflection whenever the code is fully trusted.

See Also

FieldInfo Class | FieldInfo Members | System.Reflection Namespace | FieldInfo.SetValue Overload List