Share via


PSTypeName Constructors

Definition

Overloads

PSTypeName(ITypeName)

This constructor creates a type from a ITypeName.

PSTypeName(TypeDefinitionAst)

This constructor is used when the type is defined in PowerShell.

PSTypeName(String)

This constructor is used when the type may not exist, or is not loaded.

PSTypeName(Type)

This constructor is used when the type exists and is currently loaded.

PSTypeName(String, Type)

This constructor is used when the creating a PSObject with a custom typename.

PSTypeName(ITypeName)

This constructor creates a type from a ITypeName.

public:
 PSTypeName(System::Management::Automation::Language::ITypeName ^ typeName);
public PSTypeName (System.Management.Automation.Language.ITypeName typeName);
new System.Management.Automation.PSTypeName : System.Management.Automation.Language.ITypeName -> System.Management.Automation.PSTypeName
Public Sub New (typeName As ITypeName)

Parameters

typeName
ITypeName

Applies to

PSTypeName(TypeDefinitionAst)

This constructor is used when the type is defined in PowerShell.

public:
 PSTypeName(System::Management::Automation::Language::TypeDefinitionAst ^ typeDefinitionAst);
public PSTypeName (System.Management.Automation.Language.TypeDefinitionAst typeDefinitionAst);
new System.Management.Automation.PSTypeName : System.Management.Automation.Language.TypeDefinitionAst -> System.Management.Automation.PSTypeName
Public Sub New (typeDefinitionAst As TypeDefinitionAst)

Parameters

typeDefinitionAst
TypeDefinitionAst

The type definition from the ast.

Applies to

PSTypeName(String)

This constructor is used when the type may not exist, or is not loaded.

public:
 PSTypeName(System::String ^ name);
public:
 PSTypeName(Platform::String ^ name);
 PSTypeName(std::wstring const & name);
public PSTypeName (string name);
new System.Management.Automation.PSTypeName : string -> System.Management.Automation.PSTypeName
Public Sub New (name As String)

Parameters

name
String

The name of the type.

Applies to

PSTypeName(Type)

This constructor is used when the type exists and is currently loaded.

public:
 PSTypeName(Type ^ type);
public:
 PSTypeName(Platform::Type ^ type);
public PSTypeName (Type type);
new System.Management.Automation.PSTypeName : Type -> System.Management.Automation.PSTypeName
Public Sub New (type As Type)

Parameters

type
Type

The type.

Applies to

PSTypeName(String, Type)

This constructor is used when the creating a PSObject with a custom typename.

public PSTypeName (string name, Type type);
new System.Management.Automation.PSTypeName : string * Type -> System.Management.Automation.PSTypeName
Public Sub New (name As String, type As Type)

Parameters

name
String

The name of the type.

type
Type

The real type.

Applies to