PSVariableProperty Constructor (PSVariable)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Initializes a new instance of the PSVariableProperty class with the name of the variable. This constructor is introduced by Windows PowerShell 2.0.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public PSVariableProperty(
	PSVariable variable
)

Parameters

variable
Type: System.Management.Automation.PSVariable

A PSVariable object that defines the variable that is accessed through this property.

Exception Condition
ArgumentException

variable is empty or null.

A variable property has a name/value pairing. For more information about variable properties in addition to other property types defined by the extended type system (ETS), see ETS Properties [ps]. For more information about the extended type system (ETS), see Windows PowerShell Extended Type System (ETS) [ps].

Although it is possible to derive from this class, there is no established scenario for doing this, and any attempt to do so might result in unexpected behavior.

Return to top

Community Additions

ADD
Show: