Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- class Dictionary
- {
- static void Main()
- {
- Dictionary<string, string> Dictionary = new Dictionary<string, string>()
- {
- { ".NET"," platform for applications from Microsoft"},
- {"CLR"," managed execution environment for .NET"},
- {"namespace","hierarchical organization of classes"}
- };
- Console.Write("Please insert a word to translate (.NET,CLR,namespace): ");
- string word = Console.ReadLine();
- foreach (KeyValuePair<string, string> pair in Dictionary)
- {
- if (word == pair.Key)
- {
- Console.WriteLine("The meaning of the {0} is {1}", word, pair.Value);
- }
- else
- {
- Console.WriteLine("No meaning of the {0} found!", word);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement