Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Syntax
'Declaration
Public Sub New ( _
    obj As Object _
)
public PrivateObject(
    Object obj
)
public:
PrivateObject(
    Object^ obj
)
new : 
        obj:Object -> PrivateObject
public function PrivateObject(
    obj : Object
)
Parameters
- obj 
 Type: Object- The object to wrap. 
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | obj is nulla null reference (Nothing in Visual Basic) | 
Remarks
The following table shows initial property values for an instance of the PrivateObject class that is instantiated with PrivateObject.
| Property | Value | 
|---|---|
| obj | |
| The Type of obj | 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.