• Advertisement

Archived

This topic is now archived and is closed to further replies.

reading text files in c#...

This topic is 5142 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to read a text file that is something like this: Version 1 NumMeshes 1 NumFaces 1274 Now, in c++, I would do like this: fscanf(file, "NumMeshes %d\n", &m_iNumMeshes); Is there anything similar in c#? If not, whats the best way to read this? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Off the top of my head, I can''t think of any facilities in C# that work as simply as the C method. You might want to try using a StreamReader object to read in the individual lines and then hack apart the Strings manually. I don''t do a lot of file processing in C#, so this may not be the best way.

Share this post


Link to post
Share on other sites

  • Advertisement