I want to setup function parameter setting in Visual Studio 2013 UML class diagram designer that result something like this code
public void Execute(string query = "")
{
...
}
I want to setup function parameter setting in Visual Studio 2013 UML class diagram designer that result something like this code
public void Execute(string query = "")
{
...
}
Generated method looks like
public virtual void Execute(string query = "")
{
throw new System.NotImplementedException();
}
What you are talking about is called an optional argument (in C#, at least). The original documentation is pretty good on this (https://msdn.microsoft.com/en-us/library/dd264739.aspx) but the gist of it is
public void Execute(int num, string optionalstr = "")
By doing this, num
is required, and optionalstr
is used if it is given, otherwise defaults to the right side of the equals, in this case: an empty string.