PrivateType.SetStaticField Method (String, Object)
Sets a static field contained in the wrapped type.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Sub SetStaticField ( _
name As String, _
value As Object _
)
public void SetStaticField(
string name,
Object value
)
public:
void SetStaticField(
String^ name,
Object^ value
)
member SetStaticField :
name:string *
value:Object -> unit
public function SetStaticField(
name : String,
value : Object
)
Parameters
name
Type: StringThe name of the static field.
value
Type: ObjectThe value to set to the static field.
.NET Framework Security
- 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.