Best file type to use with C#?
-
- Posts: 116
- Joined: Mon Aug 01, 2011 4:46 am
Best file type to use with C#?
I'm taking a little break from programming my game so I don't loose interest in it like everything I try to do all at once. So I figured I'll go back to the basics and start editing/creating files. I was wondering what the best file format was to use with C#. I know XML is decent but is there anything else thats easy to have C# read like a .bin or .dat file?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Best file type to use with C#?
The best file format for what? Of course C# source code files need to be unformatted text files, and the compiler makes the correct output file format when the program is built. As far as what file formats work with C#...basically everything with a publicly documented interface, and then some. You can read XML files, you can access database files, with the right libraries you can open 3D model files, Word files, SVG files, etc. If you are asking about the files types for actual C# source files, you should just download Visual C# Express (which is free) and make all of your C# files through there. Visual Studio is the most advanced IDE in the world and the advantages go far beyond just making and compiling the files. If you mean what files work with C# applications, really, the sky is the limit. Just think of what you want to use with it and Google it. I can almost guarantee there is a way to use it (even binaries through C#'s bit manipulation methods and operators), except for proprietary file types like Adobe Flash's .fla files and things like that.
The indelible lord of tl;dr
-
- Posts: 116
- Joined: Mon Aug 01, 2011 4:46 am
Re: Best file type to use with C#?
Thanks I've been searching google for new file formats to use/load/edit/save through programming in C#. It seems that I have found some through google. I wanted to see if anyone else had experience with using like a .dat file or something through C#. Such as opening it up and editing the contents then saving it again. Thanks for the words of advice.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Best file type to use with C#?
For things like .dat and binary files, it is really more about the code side and having a system worked out for how you will save to it and then read it again later. Just opening someone else's binary or .dat file is going to be a frustrating, complicated affair. It can be done in some cases, but often isn't worth the time. The author of the file has their own system for using that data, and without knowing that system, you are probably just staring at 1's and 0's lol.
The indelible lord of tl;dr