Is there a way to simplify the process of adding an overloaded method in C# using VS2005?
In VB6, I would have just added an Optional parameter the function, but in C# do I have to have to type out a whole new method with this new parameter?
Is there a way to simplify the process of adding an overloaded method in C# using VS2005?
In VB6, I would have just added an Optional parameter the function, but in C# do I have to have to type out a whole new method with this new parameter?
 
    
    with c# 2.0 there is only a way with code generation tools. resharper could do this. with c# 4.0 optional parameters are possible too.
 
    
    Yes. In C# 4.0 you can use optional parameters, but in C# 2.0 you have to specify them manually.
 
    
     
    
    You can do this with .net 4.0:
   1:  public void SendMail(string toAddress, string bodyText, bool ccAdministrator = true, bool isBodyHtml = false)
   2:  {
   3:      // Full implementation here
   4:  }
In earlier version you need to write separate methods.
