Method SetValue
- Namespace
- Microsoft.Samples.Debugging.CorMetadata
- Assembly
- corapi.dll
SetValue(object, object, BindingFlags, Binder, CultureInfo)
When overridden in a derived class, sets the value of the field supported by the given object.
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
Parameters
obj
objectThe object whose field value will be set.
value
objectThe value to assign to the field.
invokeAttr
BindingFlagsA field of Binder that specifies the type of binding that is desired (for example, Binder.CreateInstance or Binder.ExactBinding).
binder
BinderA set of properties that enables the binding, coercion of argument types, and invocation of members through reflection. If
binder
is null, then Binder.DefaultBinding is used.culture
CultureInfoThe software preferences of a particular culture.
Exceptions
- FieldAccessException
The caller does not have permission to access this field.
- TargetException
The
obj
parameter is null and the field is an instance field.- ArgumentException
The field does not exist on the object.-or- The
value
parameter cannot be converted and stored in the field.