public static StackLinkList <T> ToStackLinkList <T>(this T[] array) { var list = new StackLinkList <T>(); foreach (var item in array) { list += item; } return(list); }
private void WorkWithStackLinkList(int maxSize) { ShowName("StackLink"); StackLinkList <long> stack = new StackLinkList <long>(); for (int i = 0; i < maxSize; i++) { stack.Insert(maxSize * 10 * i); } while (!stack.IsEmpty()) { Console.WriteLine(stack.Remove()); } ShowEndMessage(); }