SetField Method (String, Object)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

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



The name of the field to set a value.


The value to set.

Exception typeCondition


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

© 2015 Microsoft