In c# it is possible to use default parameter values in a method, in example:
public void SomeMethod(String someString = "string value")
{
Debug.WriteLine(someString);
}
But now I want to use an array as the parameter in the method, and set a default value for it.
I was thinking it should look something like this:
public void SomeMethod(String[] arrayString = {"value 1", "value 2", "value 3"})
{
foreach(someString in arrayString)
{
Debug.WriteLine(someString);
}
}
But this does not work.
Is there a correct way to do this, if this is even possible at all?