How to read an entire file to a string using C#? October 6, 2022 by Tarik How about File.ReadAllText: string contents = File.ReadAllText(@"C:\temp\test.txt");