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 (Type^, array<Type^>^, array<Object^>^)

 

Initializes a new instance of the PrivateObject class.

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

public:
PrivateObject(
	Type^ type,
	array<Type^>^ parameterTypes,
	array<Object^>^ args
)

Parameters

type
Type: System::Type^

The wrapped object type.

parameterTypes
Type: array<System::Type^>^

An array of Type objects representing the number, order, and type of the parameters for constructing the object.

args
Type: array<System::Object^>^

The arguments to define the object.

Exception Condition
ArgumentNullException

type is null.

ArgumentException

parameterTypes is multidimensional.

-or-

A constructor cannot be found to match the parameters specified in PrivateObject.

This creates an object from the passed type, parameterTypes, and args parameters.

Return to top
Show: