Export (0) Print
Expand All

PrivateObject Constructor (Object, String)

Initializes a new instance of the PrivateObject class that creates the wrapper for the specified object.

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

public PrivateObject(
	Object obj,
	string memberToAccess
)

Parameters

obj
Type: System.Object

The object to wrap. This serves as starting point to reach the private members.

memberToAccess
Type: System.String

The dereferencing string that points to the object to be retrieved. This takes the form of "objectX.objectY.objectZ".

ExceptionCondition
ArgumentException

memberToAccess is a zero-length string

ArgumentNullException

obj is null or memberToAccess is null

Show:
© 2014 Microsoft