Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Exercise_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- using (StreamReader reader = new StreamReader("TextFile1.txt"))
- {
- int lineNumber = 0;
- string line = reader.ReadLine();
- while (line!=null)
- {
- if (lineNumber%2!=0)
- {
- Console.WriteLine(line);
- }
- lineNumber++;
- line = reader.ReadLine();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement