C#C
C#4y ago
Binto86

set default value of parameter to other parameter [Answered]

ok, i am aware that this is probably not possible, but can i set default value of parameter x to value of parameter y?
consider this example:
public void MyMethod(string x, string y=x)
{
  //some code
}

would this be possible?
Was this page helpful?