Write a single line of code to read the entire content of the text file.

 Posted by Raja on 9/8/2008 | Category: C# Interview questions | Views: 4378
Answer:

User following code

string strContent = System.IO.File.ReadAllText(Server.MapPath("~/MyTextFile.txt"));


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response