Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // sorce : http://www.dotnetperls.com/dictionary
- using System;
- using System.Collections.Generic;
- class Program
- {
- static void Main()
- {
- Dictionary<string, int> dictionary =
- new Dictionary<string, int>();
- dictionary.Add("cat", 2);
- dictionary.Add("dog", 1);
- dictionary.Add("llama", 0);
- dictionary.Add("iguana", -1);
- foreach (var world in dictionary)
- {
- Console.WriteLine("{0} is memberid: {1}", world.Value, world.Key);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment