I want to create an array of int [n] unique numbers:
int[] result = new int[24];
for(int i = 0; i<24; i++)
result[i] = 1;
return result;
Is there a shorter way for this. Maybe something like this:
return (from i in new int[24]
select 1).ToArray();
But not as ugly as that.
source
share