Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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".

Exception Condition
ArgumentException

memberToAccess is a zero-length string

ArgumentNullException

obj is null or memberToAccess is null

Return to top
Show: