Initializing an array is ok in these 3 cases
string[] To = { "[email protected]", "[email protected]" };
string[] To = new[] { "[email protected]", "[email protected]" };
string[] To = new string[] { "[email protected]", "[email protected]" };
But when using it as a parameter the first option is not valid so this is valid
MethodWithAnArrayParam(new string[] { "[email protected]", "[email protected]" });
MethodWithAnArrayParam(new [] { "[email protected]", "[email protected]" });
This gives an error
MethodWithAnArrayParam({ "[email protected]", "[email protected]" });
Why?