我不想写司的简单职能,但我有错误。
PS C:Usersjohn> Function Div($x, $y) { $x / $y }
PS C:Usersjohn> Div (1, 1)
Method invocation failed because [System.Object[]] doesn t contain a method named op_Division .
At line:1 char:28
+ Function Div($x, $y) { $x / <<<< $y }
+ CategoryInfo : InvalidOperation: (op_Division:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
What is my mistake? Thanks