Last active
December 21, 2015 20:49
-
-
Save scorta/6363678 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example #1 | |
// Read the file as one string. | |
string text = System.IO.File.ReadAllText(@"C:\Users\Public\TestFolder\WriteText.txt"); | |
// Example #2 | |
// Read each line of the file into a string array. Each element | |
// of the array is one line of the file. | |
string[] lines = System.IO.File.ReadAllLines(@"C:\Users\Public\TestFolder\WriteLines2.txt"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment