I am using C# .net 3.5 to build an application. I have been working with optional parameter attributes in .net 4.0 with no problems. I did notice that with 3.5 there is the option (workaround) to add the following attributes to your method like so:
public static void MethodName(string name, [Optional][DefaultValue(null)]string placeHolder)
{
}
Even though I have added the attributes to the method, if I try and call it like so:
MethodName("test");
The compiler will complain that it is looking for two parameters instead of one. Is it actually possible to do this using C# .net 3.5? Am I doing something wrong?