Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PrivateObject Constructor (Type, Type[], 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,
	Type[] parameterTypes,
	Object[] args
)

Parameters

type
Type: Type

The wrapped object type.

parameterTypes
Type: Type[]

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

args
Type: Object[]

The arguments to define the object.

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

Show:
© 2015 Microsoft