Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PrivateObject.SetFieldOrProperty Method (String, BindingFlags, 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,
	BindingFlags bindingFlags,
	Object value
)

Parameters

name
Type: String

The name of the private field or property to set.

bindingFlags
Type: BindingFlags
value
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.

Show:
© 2015 Microsoft