Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- class Program
- {
- static void Main(string[] args)
- {
- StreamReader sr = File.OpenText("test.txt");
- string k = null;
- string input = Console.ReadLine();
- for(;(k=sr.ReadLine())!=null;)
- {
- if (k.Contains(input)) { Console.WriteLine(k); break; }
- }
- if (k==null) { Console.WriteLine("Not found!"); }
- sr.Close();
- Console.ReadKey();
- }
- }
Add Comment
Please, Sign In to add comment