PrivateType.SetStaticFieldOrProperty Method (String, Object)
Sets a static field or property 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 SetStaticFieldOrProperty ( _
name As String, _
value As Object _
)
public void SetStaticFieldOrProperty(
string name,
Object value
)
public:
void SetStaticFieldOrProperty(
String^ name,
Object^ value
)
member SetStaticFieldOrProperty :
name:string *
value:Object -> unit
public function SetStaticFieldOrProperty(
name : String,
value : Object
)
Parameters
name
Type: StringThe name of the static field or property.
value
Type: ObjectThe value to set to the static field or property.
Remarks
Important
This is important for Visual Basic source code because fields and properties are used the same way.
.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.