Export (0) Print
Expand All

PrivateObject.GetField Method (String, BindingFlags)

Gets a value from a named field, based on the name and lookup mask.

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

public Object GetField(
	string name,
	BindingFlags bindingFlags
)

Parameters

name
Type: String

The name of the private field to get.

bindingFlags
Type: BindingFlags

Return Value

Type: Object
The value set for the name field.

ExceptionCondition
ArgumentException

name is null or empty.

Show:
© 2015 Microsoft