My books usually show that if you want to use an array in C# you gotta do something like this:
int [ , ] rentAmount = new int [4, 4];
But I was looking at a different one of my books and the author wrote out a program she did this instead:
int [ , ] rentAmount = { { 400, 450, 510... and on and so forth.
She did not use the new int and the brackets either, and the program runs fine.
I was just wondering, and it looks like you don't need to include the new keyword followed by int and the brackets?
int [ , ] rentAmount = new int [4, 4];
But I was looking at a different one of my books and the author wrote out a program she did this instead:
int [ , ] rentAmount = { { 400, 450, 510... and on and so forth.
She did not use the new int and the brackets either, and the program runs fine.
I was just wondering, and it looks like you don't need to include the new keyword followed by int and the brackets?