How to read/write files in .Net Core?

Ankit picture Ankit · Jan 17, 2017 · Viewed 99.8k times · Source

What are the options to read/write files in .Net Core?

I am working on my first .Net Core app and looking for File.Read*/File.Write* functions (System.IO from .Net) alternatives.

Answer

Leszek P picture Leszek P · Jan 17, 2017

Package: System.IO.FileSystem

System.IO.File.ReadAllText("MyTextFile.txt"); ?