1
我發現互聯網上此代碼來檢查文件是否存在問題與文件存在命令的Windows Phone
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
if (store.FileExists("Setting.xml"))
{
MessageBox.Show("have file");
}
else
{
MessageBox.Show("haven't file");
}
}
當我嘗試,它只能說明條件「還沒有文件」。是否有或沒有Setting.xml文件? (我可以通過XDocument data = XDocument.Load(「Setting.xml」)來加載這個文件;做或不做)?