Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyCollection : Dictionary<int, Pair>
- {
- public void Print()
- {
- foreach (var i in Keys)
- Console.WriteLine("Key = {0}, value = {1}", i, this[i]);
- }
- public void Add(int key, Pair valuee)
- {
- base.Add(key, valuee);
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Pair p = new Pair(1, 2);
- MyCollection mc = new MyCollection();
- mc.Add(10, p);
- mc.Print();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement