posted 7/5/2011 by Vivek Thakur
Assume you have a text file, and you want to read all its contents into a C# string variable. Here is a quick and easy way to do it in just one line of code:
string text = System.IO.File.ReadAllText("{{path to your text file goes here}}");
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18