How to

read text from file

Published: 15. December 2008 | Updated: 15. December 2008
License: Microsoft Public License (MS-PL)
Categories: File system » Files
Tags: C# File System Text
Was this snippet helpful for you? YESYES / NONO

Snippet example shows how to open and read text from file

Import namespace

using System.IO;

Code

string text = File.ReadAllText(@"C:\test.txt");
Send us feedback about this snippet »



Related Snippets: