When I try to use
Expand|Select|Wrap|Line Numbers
- File.Exists("Data/Settings.dat")
I am trying to build a system that automatically makes a file, if it doesn't exist, after it has been encoded.
Expand|Select|Wrap|Line Numbers
- string Settings = "";
- string[] NewSettings = { "[BGM 10]", "[SFX 10]", "[ViewDistance 10]", "[Textures 10]", "[Lighting 5]", "[Shadows 5]", "[Gamma 0]", "[Sharpness 0]" };
- string Encoded = EncodeSettings(NewSettings);
- MessageBox.Show(Encoded);
- if (File.Exists("Data/Settings.dat")) { Settings = System.IO.File.ReadAllText("Data/Settings.dat"); }
- else
- {
- File.WriteAllText("Data/Settings.dat", Encoded);
- }
No Debug window popped up.
P.S. this program happens to be a 1000+ Liner, so I cannot place the full thing here. If you're willing to try and read the 1000+, here it is