Jump to content
  • Advertisement

Archived

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

xyz

reading text files in c#...

This topic is 5318 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!