Information Technology Reference
In-Depth Information
class Program {
static void Main() {
MyStack<int> StackInt = new MyStack<int>();
MyStack<string> StackString = new MyStack<string>();
StackInt.Push(3); StackInt.Push(5); StackInt.Push(7);
StackInt.Print();
StackString.Push("This is fun");
StackString.Push("Hi there! ");
StackString.Print();
}
}
This code produces the following output:
Value: 7
Value: 5
Value: 3
Value: Hi there!
Value: This is fun
Search WWH ::




Custom Search