Can I initialize an array of classes with an default constructor (or even better, an specified one) without going through a loop?
So, let's say I have an array of Person
:
var arr = new Person[10];
Now, I should initialize each Person
by looping through all of them.
foreach(var p in arr)
p = new Person();
Can I avoid the loop?