Export (0) Print
Expand All

PSScriptProperty Constructor

Initializes a new instance of the PSScriptProperty class. The variants of this constructor can create an object that contains the name of the property and a getter script, and can create an object that contains the name of the property, a getter and setter script.

A script property is a property that has getter and setter scripts. For more information about script properties as well as other property types, see PSObject Property Types.

For more information about the ETS that uses PSObject objects, see Windows PowerShell Extended Type System (ETS).

NameDescription
PSScriptProperty (String, ScriptBlock)Initializes a new instance of the PSScriptProperty class that contains the property name and a getter script.
PSScriptProperty (String, ScriptBlock, ScriptBlock)Initializes a new instance of the PSScriptProperty class that contains the property name, getter script, and setter script.


Show:
© 2014 Microsoft