Advertisement
Krissy

Dictionary2

Jan 27th, 2013
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6.  
  7. class Dictionary
  8. {
  9.     static void Main()
  10.     {
  11.         string[] dictionary = { ".NET - platform for applications from Microsoft",
  12.                                 "CLR - managed execution environment for .NET",
  13.                                 "namespace - hierarchical - organization of classes",
  14.                               "Java - object-oriented programming language, similar to C#",
  15.                               "Javascript - web programming language"};
  16.         string word = "Java";//Console.ReadLine();
  17.         foreach (string line in dictionary)
  18.         {
  19.             if (line.IndexOf(word+" -")==0)
  20.             {
  21.                 Console.WriteLine(line);
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement