SetFieldOrProperty Method (String, Object)
Collapse the table of content
Expand the table of content

PrivateObject.SetFieldOrProperty Method (String, Object)

Sets a value of a wrapped field or property based on the name.

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

public void SetFieldOrProperty(
	string name,
	Object value


Type: String

The name of the private field or property to set.

Type: Object

The value to set for name.

Important noteImportant

This is important for Visual Basic source code as fields and properties are used the same way.

© 2016 Microsoft