P
Paul E Collins
This does what you'd expect ...
string[] foo = { "bar", "baz", "quux" };
.... so why is this a syntax error?
private string[] foo()
{
return { "bar", "baz", "quux" };
}
I know that it works with 'new string[]' inserted, but I don't understand
why assignment and 'return' disagree on what is a valid rvalue.
P.
string[] foo = { "bar", "baz", "quux" };
.... so why is this a syntax error?
private string[] foo()
{
return { "bar", "baz", "quux" };
}
I know that it works with 'new string[]' inserted, but I don't understand
why assignment and 'return' disagree on what is a valid rvalue.
P.