Coffeehouse Post

Single Post Permalink

View Thread: Reading int from file in C#
  • User profile image
    kettch

    @algorith: Is it just a text file or a binary file of some kind?

    If it's text, then the following should suffice:

    List<string> items = System.IO.File.ReadAllLines(@"C:\temp\somefile.txt");