void IStack.AddOnTop(IStack stack) { if (stack == null) { throw new ArgumentNullException(nameof(stack)); } BottomToTop.AddRange(stack.BottomToTop.Cast <Block>()); }
void IStack.AddToBottom(IStack stack) { if (stack == null) { throw new ArgumentNullException(nameof(stack)); } if (BottomToTop.Count > 0) { BottomToTop.InsertRange(0, stack.BottomToTop.Cast <Block>()); } else { BottomToTop.AddRange(stack.BottomToTop.Cast <Block>()); } }