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 (String, String, Object[])

 

Initializes a new instance of the PrivateObject class. This creates the object of the specified type and wraps it in the private object.

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

public PrivateObject(
	string assemblyName,
	string typeName,
	params object[] args
)

Parameters

assemblyName
Type: System.String

Name of the assembly that contains the type.

typeName
Type: System.String

Fully qualified name of the type.

args
Type: System.Object[]

Arguments to pass to the constructor of the object.

Exception Condition
ArgumentNullException

assemblyName or typeName is null.

An object is created by using the typeName and args.

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

Property

Value

Target

The object created from typeName and args.

RealType

The wrapped object type of the object created from typeName and args.

Return to top
Show: