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, PrivateType)

 

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,
	PrivateType type
)

Parameters

obj
Type: System.Object

The object to wrap.

type
Type: Microsoft.VisualStudio.TestTools.UnitTesting.PrivateType

The wrapped object type.

Exception Condition
ArgumentNullException

type is null

The following table shows initial property values for an instance of the PrivateObject class that is instantiated with PrivateObject .

Property

Value

Target

obj

RealType

The wrapped object type

Return to top
Show: