Coffeehouse Post

Single Post Permalink

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

    ,algorith wrote

     

    2 11 3 10
    1 9 4 6
    6 13 7 8
    5 14 15 12
     
    So what I want is to read int by int and put each number into my 2-dimensional array. I guess it boils 
    down to if I can do something like this in C#:

     

    They are not int's to begin with they are char's or strings the character 2 will come in as int 32 space as int 20 as the file is not a binary file but a 'text' file. so up to the newline we have

    32 20 31 31 20 33 20 31 30 0d 0a