Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- ReadFile().Wait();
- Console.ReadLine();
- }
- static async Task ReadFile()
- {
- using (StreamReader sr = new StreamReader("upload.sql"))
- {
- string line;
- while ((line = await sr.ReadLineAsync()) != null)
- {
- int index = -1;
- if(!string.IsNullOrEmpty(line) && (index = line.IndexOf("q2_")) != -1)
- {
- var splited = line.Substring(index, line.IndexOf(' ', index) - index);
- Console.WriteLine(splited);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement