The correct syntax is to use named arguments in combination with optional parameters, for example:
_order.GetComputers(ramSizeInGB: ram);
Optional parameters can be skipped (without using named arguments) only when they are located after the specified arguments, so this will be fine:
_order.GetComputers(new Brand());
like this
_order.GetComputers();
To understand why this should be done this way, consider a method with this signature:
public void Method(double firstParam = 0, long secondParam = 1) Method(3);
Here, the compiler cannot deduce if the developer should have called the method with the first parameter or with the second parameter, so the only way to distinguish yourself is to explicitly indicate which arguments are mapped to which parameters.
Sweko source share