Windows phone 如何检测Windows Phone中的隔离存储空间
根据标题,如何确定Windows Phone应用程序中已使用的隔离存储空间?您可以知道可用的可用空间和已使用的空间Windows phone 如何检测Windows Phone中的隔离存储空间,windows-phone,isolatedstorage,Windows Phone,Isolatedstorage,根据标题,如何确定Windows Phone应用程序中已使用的隔离存储空间?您可以知道可用的可用空间和已使用的空间 try { using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { Int64 curAvail = store.AvailableFreeSpace; var used = store.Quota - curAvail; } } catc
try
{
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
Int64 curAvail = store.AvailableFreeSpace;
var used = store.Quota - curAvail;
}
}
catch (IsolatedStorageException)
{
// TODO: Handle that store could not be accessed.
}
谢谢你的帖子。但是IsolatedStorageFile没有UsedSize属性。我正在开发mango应用程序。我运行了此代码,但得到的值太大。应用程序使用的空间值似乎不正确。IsolatedStorageFile.UsedSize是正确的方法,但未作为Silverlight for WP7的一部分公开。获取该值的目的是什么?也许你可以用另一种方式来处理你的问题。