In powershell functions i can have something like
Function myFunction { Param( [Parameter(Mandatory=$True)][string]$foo, [Parameter(Mandatory=$False)][string]$bar = "whatever" ) .... } But this seems limited to functions - is there something similar for method?
class MyClass { ... [void]MethodA { Param( .... dont works for me.
The interpreter complains about the missing '(' in the class method parameter list.