【发布时间】:2010-10-05 20:00:24
【问题描述】:
我有
var previous = new BitArray(new bool[]{true});
var current = new BitArray(new bool[]{false});
我想连接它们。我已经试过了:
var next = new BitArray(previous.Count + current.Count);
var index = 0;
for(;index < previous.Count; index++)
next[index] = previous[index];
var j = 0;
for(;index < next.Count; index++, j++)
next[index] = current[j];
previous = current;
但这看起来并不是最好的方法。
【问题讨论】: