Sign in to follow this  
MrKao

Right Way To Read File From x360?

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:

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


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
[quote name='MrKao' timestamp='1305505550' post='4811270']
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:

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


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

Thanks for the help.
[/quote]

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this