private static void CheckSameSize(ISimpleBitArray first, ISimpleBitArray second) { if (first.Count != second.Count) { throw new InvalidOperationException($"Arrays of different size are not supported! Fisrt array size: {first.Count}. Second array size: {second.Count}"); } }
public ISimpleBitArray Or(ISimpleBitArray other) { CheckSameSize(this, other); var res = new SimpleBitArray(Count); for (int i = 0; i < Count; i++) { res[i] = this[i] | other[i]; } return(res); }