Dela via


PSObject Constructors

Definition

Overloads

PSObject()

Initializes a new instance of PSObject with an PSCustomObject BaseObject.

PSObject(Int32)

Initializes a new instance of PSObject with an PSCustomObject BaseObject with an initial capacity for members.

PSObject(Object)

Initializes a new instance of PSObject wrapping obj (accessible through BaseObject).

PSObject(SerializationInfo, StreamingContext)

Creates a PSObject from an ISerializable context.

PSObject()

Initializes a new instance of PSObject with an PSCustomObject BaseObject.

public:
 PSObject();
public:
 PSObject();
 PSObject();
public PSObject ();
Public Sub New ()

Applies to

PSObject(Int32)

Initializes a new instance of PSObject with an PSCustomObject BaseObject with an initial capacity for members.

public PSObject (int instanceMemberCapacity);
new System.Management.Automation.PSObject : int -> System.Management.Automation.PSObject
Public Sub New (instanceMemberCapacity As Integer)

Parameters

instanceMemberCapacity
Int32

The initial capacity for the instance member collection.

Applies to

PSObject(Object)

Initializes a new instance of PSObject wrapping obj (accessible through BaseObject).

public:
 PSObject(System::Object ^ obj);
public:
 PSObject(Platform::Object ^ obj);
 PSObject(winrt::Windows::Foundation::IInspectable const & obj);
public PSObject (object obj);
new System.Management.Automation.PSObject : obj -> System.Management.Automation.PSObject
Public Sub New (obj As Object)

Parameters

obj
Object

Object we are wrapping.

Exceptions

If obj is null.

Applies to

PSObject(SerializationInfo, StreamingContext)

Creates a PSObject from an ISerializable context.

protected:
 PSObject(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected PSObject (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.Automation.PSObject : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.PSObject
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

Serialization information for this instance.

context
StreamingContext

The streaming context for this instance.

Applies to