デフォルトでは、参照型の配列はすべての参照が null として初期化されます。
代わりに、新しいデフォルト オブジェクトでそれらを初期化する構文のトリックはありますか?
例えば
public class Child
{
}
public class Parent
{
private Child[] _children = new Child[10];
public Parent()
{
//any way to negate the need for this?
for (int n = 0; n < _children.Length; n++)
_children[n] = new Child();
}
}