Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

text read c#

// Example #1
// Read the file as one string.
string text = System.IO.File.ReadAllText(@"C:UsersPublicTestFolderWriteText.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:UsersPublicTestFolderWriteLines2.txt");
Source by learn.microsoft.com #
 
PREVIOUS NEXT
Tagged: #text #read
ADD COMMENT
Topic
Name
5+4 =