Stack


Windows 10 UWP: Undo / Redo on InkCanvas

The InkCanvas in UWP only got pens by default, it can not perform Undo or Redo. To implement this, we will need to code for ourselves. Official document covered Undo functionalilty, but not redo. Today, I have successfully done it, and I'd like to share with you. First, you need to add two custom buttons on the InkToolbar for Undo / Redo <InkToolbarCustomToolButton Name="undoButton" …


C#数据结构之顺序栈

继续发很久以前的那个系列。。。今天是顺序栈。。 接口如下: public interface IStack<T> { void Clear(); void Push(T item); T Pop(); T GetTop(); } SqStack类: public class SqStack<T> : IStack<T> { private int _Maxsize; private T[] _Data; private int _Top; public T this[int index] { get { return _Data[index]; } …