Answers for "how to return file stream from function in c#"

1

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

Code answers related to "how to return file stream from function in c#"

Browse Popular Code Answers by Language