FileInfo.OpenRead help

In The Ultimate C# Series: Part 1 > Working With Files > File and FileInfo:

At 4:55 Mosh says, “Later in this section I will show you a very simple way to read a file if you don’t want to use File.ReadAllText.”

He doesn’t show us that technique and then in the exercises in the Working With Files section the first exercise asks us to read text from a file. We could do that with File.ReadAllText()… but what about the technique he mentioned?

Thanks,

No idea.
I did not take that course and I hardly see simpler than File.ReadAllText();

A simple static function asking for a simple file path.

How can it be simpler?

It must be a mistake IMHO.

1 Like