public void LoadRealmlist()
{
try
{
File.Delete(Properties.Settings.Default.WoWFolderLocation + "Data/realmlist.wtf");
StreamWriter TheWriter = new StreamWriter(Properties.Settings.Default.WoWFolderLocation + "Data/realmlist.wtf");
TheWriter.WriteLine("this is my test string");
TheWriter.Close();
}
catch (Exception)
{
}
}
Will my method properly delete a file, then create one with "realmlist.wtf" as the name and then write a line to it?
I'm kind of confused because I can't see the line where it actually creates the file again. Or does the act of creating a StreamWriter automatically create a file?