We have code like:
try
{
streamOptions = new IsolatedStorageFileStream( "FileName",
FileMode.Open,
FileAccess.Read);
}
catch ( FileNotFoundException )
{
this.userSettings = new UserSettings();
load = false;
}
This will cause Visual Studio to go into the debugger often when I am debugging, so I want to protect the above code with "if", so it only runs when the Inventor isolated file exists. However, it is unclear how to use IsolStorageFile.FileExists () to check the file that is going to open PropertyStorageFileStream , for example. what parameters do I need to give when I am a βnewβ IsolatedStorageFile object.
source
share