What are the syntax rules for creating an anonymous array?
i.e.
int[] function()
{
int element1 = 1;
int element2 = 2;
return //array with element1 and element2
{
And what other uses does it have?
What are the syntax rules for creating an anonymous array?
i.e.
int[] function()
{
int element1 = 1;
int element2 = 2;
return //array with element1 and element2
{
And what other uses does it have?
return new int[] { element1, element2 };
And what other uses does it have?
I'm not sure what you mean here I'm afraid.
You can't return anonymous type and int[]
is not anonymous