0

我尝试使用以下代码增加 IsoLatedStorage 大小:

using (IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication())
{
   if (iso.FileExists(fileName))
     iso.DeleteFile(fileName);

   iso.IncreaseQuotaTo(iso.Quota + memoryStream.Length);
   //.....
}

但我不能,我检查了iso.Quota之前和IncreaseQuotaTo调用之后,它没有改变。看起来像代码 iso.IncreaseQuotaTo(iso.Quota + memoryStream.Length); 不工作。然后我得到错误:没有足够的空间来执行操作。当我尝试将memoryStream 写入IsolatedStream 时。

不知道为什么。如何解决这个问题?

4

1 回答 1

1

我不确定这是否是您的问题,也许没有增加,因为如果您想增加隔离存储配额,您必须询问用户(使用消息框或类似的东西),否则我认为不会去工作

于 2012-09-25T05:41:14.757 回答