Have tried looking into it, but not even sure on how to google this.
I know this gives an error var intArray = {1,2,3,4};
and that it has to be
var intArray = new int[]{1,2,3,4};
or int[] intArray = {1,2,3,4};
but I can't seem to find an actual reason WHY I can't use the first one.
Since at the very least I'd expect it to make an object[] by default.
So basically what I'm asking is: Why is the first one incorrect/not allowed.
var intArray = { 1, 2, 3, 4 }; //incorrect
var numArray = new int[] { 1, 2, 3, 4 }; //correct
int[] digArray = { 1, 2, 3, 4 }; //correct
~Suggestions for a better title are welcome, didn't really know how to ask this.~