I had just started learning C# and using Tutorials Point
to do this. In the section on arrays, I keep seeing arrays declared as
string[] sarray = { "Hello", "From", "Tutorials", "Point" };
Or other times like this:
int [] marks = new int[5] { 99, 98, 92, 97, 95 };
Coming from c++, the first method of declaration wasn't all that new to me, but the second one is the one I don't understand. The question is if the array is going to dynamically initialised, then why use the brace enclosed initializer list to specify the contents of the array?
Is there an advantage to initialising that second one the way it has been done?