I have a list of integer arrays:
List<int[]> MyList = new List<int[]>();
When trying to add an array to this list like this:
MyList.Add({ i, j });
The program won't compile, however this it has no issue with
int[] k = { i, j };
MyList.Add(k);
Why is the first method not valid and is there a better way than the second to carry out this task?