相关疑难解决方法(0)

如何检查Windows应用商店应用中是否存在文件?

有没有其他方法可以检查Windows应用商店应用中是否存在文件?

try
{
    var file = await ApplicationData.Current.LocalFolder.GetFileAsync("Test.xml");
    //no exception means file exists
}
catch (FileNotFoundException ex)
{ 
    //find out through exception 
}
Run Code Online (Sandbox Code Playgroud)

c# filenotfoundexception microsoft-metro windows-8 windows-runtime

48
推荐指数
3
解决办法
3万
查看次数