I'm developing an application whose target framework is version 3.5. But while looking at the code, I found a method using default parameters:
public void Contact(string name, string email, string phone, string phoneAreaCode = "")
{
//...
}
and got confused.
The language features are independent of the framework version? What is the relation between both and why is this the code above possible?
EDIT: I have created 2 projects (a class library and a console) in VS2010, both tageting the .NET 2.0 Framework. On the class library, I've created a method with an optional string parameter. I've used it in the console app with no problems, with and without passing the parameter. Does this have anything to do with VS2010? And by "VS2010" you mean C# compiler 4.0?