我有一个二维对象数组,我使用传统的循环进行初始化:
PairDS[,] tempPb1 = new PairDS[LoopCounterMaxValue+1, LoopCounterMaxValue+1];
for (int i = 0; i <= LoopCounterMaxValue; i++)
for (int j = 0; j <= LoopCounterMaxValue; j++)
tempPb1[i, j] = new PairDS();
有没有更好的方法使用可枚举对象或其他东西来做这件事呢?