Here is the easiest way to read an entire text file into a C# string:

string s = System.IO.File.ReadAllText( path );

Popularity: 51% [?]

Related posts:

  1. C# Read Text File Line-by-Line
  2. Read File into Byte Array
  3. Check Valid File Path in C#
  4. Truncate File Path with Ellipsis
  5. C# Read String Line by Line