static void Main(string[] args) { LIFO l = new LIFO(); int i; for (i = 0; i < 10; i++) l.Add(i); Console.WriteLine(l.ToString()); Console.ReadLine(); int h = l.Head(); LIFO t = l.Tail(); Console.WriteLine("Head:\t" + h); Console.WriteLine("Tail:\t" + t); Console.ReadLine(); }
public LIFO(int x) { this.czy_null = false; this.head = x; this.tail = NullLIFO; }
public LIFO(int h, LIFO t) { this.czy_null = false; this.head = h; this.tail = t; }
public LIFO() { this.czy_null = true; this.tail = null; this.head = 0; }