• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

how to call a static method in a .net class from powershell?

J
#2
On Sep 11, 12:40 pm, YY <Y...@xxxxxx> wrote:

> I know how to call an instance method from PSH, but who can tell me how to
> call a static method?
[ClassName]::StaticProperty or [ClassName]::StaticMethod(), for
example:

PSH$ [System.DateTime]::Now
11 September 2007 12:48:54

PSH$ [regex]::Split( "System.Text.RegularExpressions.Regex", "\." )
System
Text
RegularExpressions
Regex

Jeff Hillman
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)