C# Default Parameters

前端 未结 4 1363
闹比i
闹比i 2020-12-30 08:32

This is, probably, a very simple answer for someone. I have a method with an Optional Parameter like so;

public static Email From(string emailA         


        
4条回答
  •  情话喂你
    2020-12-30 09:22

    C# 4.0 is included with Visual Studio 2010, and the C# compiler understands optional parameters. So yes, the C# 4.0 language definition is something different than .NET 4.0. I guess a method with optional parameters compiled for .NET 3.5 will show overloaded methods when opening with eg. VS 2008

提交回复
热议问题