Powershell,交互式调用静态方法
我坐在 PowerShell 命令提示符下并关注 http://technet.microsoft。 com/en-us/library/dd347632.aspx
PS C:\> [System.Math]::Sqrt (9)
Unexpected token '(' in expression or statement.
At line:1 char:22
+ [System.Math]::Sqrt ( <<<< 9)
+ CategoryInfo : PArserError: ((:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
我是被欺骗了还是教程给了我一些有语法错误的东西?
我如何做一些基本的事情,比如调用静态方法?
I'm sitting at a PowerShell command prompt and following http://technet.microsoft.com/en-us/library/dd347632.aspx
PS C:\> [System.Math]::Sqrt (9)
Unexpected token '(' in expression or statement.
At line:1 char:22
+ [System.Math]::Sqrt ( <<<< 9)
+ CategoryInfo : PArserError: ((:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
Am I being tricked or did the tutorial give me something that has a syntax error?
How do I do a basic thing like invoke a static method?
Sqrt 后不要有空格:
Don't have the space after Sqrt: