I have a .NET class with number of optional parameters, say:
void Method(int one, int two, int three = 0, int four = 0, int five = 0);
Is there a way to call the method from PowerShell, passing a value to the parameter five
, without listing parameters three
and four
?
In C#, I can do:
instance.Method(1, 2, five: 5);
Is there a similar syntax is PowerShell?