February 2019
Intermediate to advanced
626 pages
15h 51m
English
All of the members demonstrated so far have required creation of an instance of a type using either New-Object or ::new().
Static members may be executed without creating an instance of a type (based on a class).
Classes may implement static properties and static methods using the Static modifier keyword:
class MyClass { static [String] $Property = 'Property value' static [String] Method() { return 'Method return' }}
The static members are invoked as follows:
[MyClass]::Property[MyClass]::Method()
The Hidden modifier may be used in conjunction with the Static modifier. The modifiers may be used in either order.
Read now
Unlock full access