【问题标题】:Problems with finding a "Shared" directory in isolated storage在隔离存储中查找“共享”目录的问题
【发布时间】:2013-07-20 04:42:56
【问题描述】:

当我使用以下代码时:

var appStorage = IsolatedStorageFile.GetUserStoreForApplication();

string[] listDirectories = appStorage.GetDirectoryNames();

我拉出了一个名为“Shared”的目录,有什么简单的方法可以忽略这个目录,还是我必须在GetDirectoryNames()中定义参数?

还有,Shared 文件夹是/可以用来做什么的?

【问题讨论】:

  • 忽略目录是什么意思?你想达到什么目的?

标签: c# windows-phone-7 windows-phone-8 isolatedstorage windows-phone-7.8


【解决方案1】:

只需将其从结果中删除:

var appStorage = IsolatedStorageFile.GetUserStoreForApplication();
var listDirectories = appStorage.GetDirectoryNames().Where(l => l != "Shared");

它可以用于例如生成自定义图像作为动态图块时,图像必须存储在此目录中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多