Sets the default value of this field.
[Visual Basic] Public Sub SetConstant( _ ByVal defaultValue As Object _ ) [C#] public void SetConstant( object defaultValue ); [C++] public: void SetConstant( Object* defaultValue ); [JScript] public function SetConstant( defaultValue : Object );
Exception Type | Condition |
---|---|
InvalidOperationException | if the containing type has been created using TypeBuilder.CreateType(). |
FieldBuilder Class | FieldBuilder Members | System.Reflection.Emit Namespace