Sets the value of the requested field.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'宣言
Public Overridable Sub SetField ( _
field As FieldInfo, _
instance As Object, _
value As Object _
)
'使用
Dim instance As VirtualTypeImplementor
Dim field As FieldInfo
Dim instance As Object
Dim value As Object
instance.SetField(field, instance, value)
public virtual void SetField(
FieldInfo field,
Object instance,
Object value
)
public:
virtual void SetField(
FieldInfo^ field,
Object^ instance,
Object^ value
)
public function SetField(
field : FieldInfo,
instance : Object,
value : Object
)
Parameters
field
Type: System.Reflection.FieldInfoThe field for which to set the value.
instance
Type: System.ObjectThe instance on which to set the field. This may be a null reference (Nothing in Visual Basic) if the field is static.
value
Type: System.ObjectThe new value of the field.
Exceptions
| Exception | Condition |
|---|---|
| NotImplementedException | If non-abstract derived class did not provide an implementation by overriding this method. |
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.