SHARE
TWEET

Untitled

ognyan Feb 1st, 2013 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. class Dictionary
  5. {
  6.     static void Main()
  7.     {
  8.         Dictionary<string, string> Dictionary = new Dictionary<string, string>()
  9.                     {
  10.                         { ".NET","  platform for applications from Microsoft"},
  11.                         {"CLR"," managed execution environment for .NET"},
  12.                         {"namespace","hierarchical organization of classes"}
  13.                     };
  14.         Console.Write("Please insert a word to translate (.NET,CLR,namespace): ");
  15.         string word = Console.ReadLine();
  16.  
  17.         foreach (KeyValuePair<string, string> pair in Dictionary)
  18.         {
  19.             if (word == pair.Key)
  20.             {
  21.                 Console.WriteLine("The meaning of the {0} is {1}", word, pair.Value);
  22.             }
  23.             else
  24.             {
  25.                 Console.WriteLine("No meaning of the {0} found!", word);
  26.             }
  27.         }
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top