• Advertisement
Sign in to follow this  

Right Way To Read File From x360?

This topic is 2475 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

Hello,

When developing a game/application for the x360, what is the proper way of reading in a file from disk? My code currently looks something like this:

System.IO.StreamReader reader = new System.IO.StreamReader("Content/txt/database.csv", Encoding.GetEncoding(1252));


This works fine on my PC but is throwing a PlatformNotSupportedException now that I'm debugging on the x360.

Thanks for the help.

Share this post


Link to post
Share on other sites
Advertisement

Hello,

When developing a game/application for the x360, what is the proper way of reading in a file from disk? My code currently looks something like this:

System.IO.StreamReader reader = new System.IO.StreamReader("Content/txt/database.csv", Encoding.GetEncoding(1252));


This works fine on my PC but is throwing a PlatformNotSupportedException now that I'm debugging on the x360.

Thanks for the help.


I can't remember which ones work right now off the top of my head, but if you look int he documentation, it lists the supported platforms for each class. Use any one that says Xbox360.

Share this post


Link to post
Share on other sites
Thanks a lot. :) There's always a few dozen ways to accomplish any given objective, so I thought I'd check with you guys if there was any single "best practices" method. I'll try that link for now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement