Answers for "c# open file from FileStream"

7

read file c#

string text = File.ReadAllText(@"c:file.txt", Encoding.UTF8);
Posted by: Guest on November-18-2020
2

c# read file stream

//this will get a string with all the text from the file
var fileText = File.ReadAllText(@"pathtomyfile.txt");

//this will get all of the lines of the file as an string[]
var fileLines = File.ReadAllLines(@"pathtomyfile.txt");
Posted by: Guest on February-17-2020

Browse Popular Code Answers by Language