Static in PowerShell is calling a method without creating
instance of the object.
In Powershell it not always mandatory to create new function, there are many existing .Net build function can be used.
In Powershell it not always mandatory to create new function, there are many existing .Net build function can be used.
Eg. [Math] class
PS C:\> [math]::Sqrt(4)
2
To see all the static method associated with the class
PS C:\> [math] | gm -Static
Happy Learning
No comments:
Post a Comment