Export (0) Print
Expand All

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

Parameters

name
Type: System.String

The name of the field to set a value.

bindingFlags
Type: System.Reflection.BindingFlags
value
Type: System.Object

The value to set.

ExceptionCondition
ArgumentException

name is null or empty.

Show:
© 2014 Microsoft