Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DemoStack1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Demo de Stack");
- Stack miPila = new Stack();
- miPila.Push('a');
- miPila.Push('b');
- miPila.Push('c');
- Console.WriteLine(miPila.Pop());
- Console.WriteLine(miPila.Pop());
- Console.WriteLine(miPila.Pop());
- try {
- Console.WriteLine(miPila.Pop());
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement