Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PrivateObject.SetField Method (String, Object)

 

Sets a value for the field of the wrapped object, identified by name.

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

public void SetField(
	string name,
	object value
)

Parameters

name
Type: System.String

The name of the field to set a value.

value
Type: System.Object

The value to set.

Exception Condition
ArgumentException

name is null or empty.

Return to top
Show: