VitalyD

Untitled

Jan 21st, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace Task1
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             string[] lines = File.ReadAllLines("dictionary.txt");
  15.             HashSet<string> dictionary = new HashSet<string>(lines);
  16.  
  17.             var data = File.ReadLines("text.txt").GetEnumerator();
  18.             while (data.MoveNext())
  19.             {
  20.                 foreach(string word in data.Current.Split(' '))
  21.                 {
  22.                     if (dictionary.Contains(word))
  23.                     {
  24.  
  25.                     }
  26.                 }
  27.             }
  28.            
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment