What is the difference between this ASP.NET MVC2 method signature, which uses the DefaultValue attribute:
public ActionResult DoStuff([DefaultValue(MyEnum.Alpha)] MyEnum enumToUse, bool printPage = false)
{
//...
}
And this signature, which instead uses a C# 4.0 optional argument?
public ActionResult DoStuff(MyEnum enumToUse = MyEnum.Alpha, bool printPage = false)
{
//...
}
Are the two statements different in any functional way, or is it just a matter of preference?