This documentation is archived and is not being maintained.

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
)
public void SetField (
	String name, 
	Object value
)
public function SetField (
	name : String, 
	value : Object
)

Parameters

name

The name of the field to set a value.

value

The value to set.

Exception typeCondition

ArgumentException

name is a null reference (Nothing in Visual Basic) or empty.

Show: