Search code examples
c#.netreadfile.net-standard

How can I read a text file in .Net Standard version 1.0 or 1.1?


I want to read the contents of a text file.

Is this possible in .Net Standard 1.0 or 1.1?

File.ReadAllLines("...");

enter image description here


Solution

  • Long story short: NO

    Check this link File class in net standard 1.1

    enter image description here

    Why not go to 1.3? You shouldn't have any breaking compatibility issues. I don't see any work arounds that are easy to implement.

    You can also check compatibility table to see if you can use the version without any issue, based on the framework where you want to consume the library.