Exemple #1
0
        private static void TestSequenceStack()
        {
            SqStack <int> sqStack = new SqStack <int>();

            SequenceStack <int> .InitStack(sqStack);

            SequenceStack <int> .Push(sqStack, 10);

            SequenceStack <int> .Push(sqStack, 2);

            SequenceStack <int> .Push(sqStack, 3);

            SequenceStack <int> .Push(sqStack, 4);

            int popElem = SequenceStack <int> .Pop(sqStack);

            int topElem = SequenceStack <int> .GetTop(sqStack);

            int result = SequenceStack <int> .Conversion(10, 8);

            Console.WriteLine();
        }
 public static T GetTop(SqStack <T> sqStack)
 {
     if (sqStack.top == -1)
     {
         return(default);
 public static void InitStack(SqStack <T> sqStack)
 {
     sqStack.top = -1;
 }