Using Using Using Using Using Using Using Namespace

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Collections;

namespace TextFileReader_csharp
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
StreamReader objReader = new StreamReader("d:\\Test.txt");
string sLine = "";
ArrayList arrText = new ArrayList();

// while (sLine != null)


//{
sLine = objReader.ReadToEnd();
//if (sLine != null)
arrText.Add(sLine);
//}
objReader.Close();

foreach (string sOutput in arrText)


Console.WriteLine(sOutput);
Console.ReadLine();
}
}
}

You might also like