public void ObjTest(StringBuilder sb, List<string> list, int i = 0, [Optional] string bs)
{
......
}
The above code throwing compilation error " Optional parameters must appear after all required parameters ". Does optional parameter and optional attribute not supported together in same method parameter, but it allows params arry after optional paramer ?
You can use them in conjunction but the optional parameter (the language construct) must be the last parameter in the parameter list.