Reading Text Data from a File in C# ?

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 1462
using System;
using System.IO;

namespace csharp_station.howto
{
class Txt_rd
{
static void Main(string[] args)
{
Textreader txt_rd= new StreamReader("txt_rd.txt");
Console.WriteLine(txt_rd.ReadLine()); // cl
txt_rd.Close();
}
}
}

Comments or Responses

Posted by: Hariinakoti on: 12/27/2012 Level:Starter | Status: [Member] | Points: 10
@Sabari Mahesh
where u read text file.I'm getting error

Login to post response