0
我有一个问题,当我想获得目录Windows Phone 7的文件清单IsolatedStorage
文件的列表,这是我的代码
try
{
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
StringBuilder sb = new StringBuilder();
string subDir = Path.Combine("NotesYours", "Notes");
if (store.DirectoryExists(subDir))
{
string searchPath = Path.Combine(subDir, "*");
string[] fileInSubDir = store.GetFileNames(searchPath);
tbtbtes.Text = fileInSubDir.Length.ToString();
}
else
{
MessageBox.Show("dir not exist");
}
}
}
catch (IsolatedStorageException)
{
}
长度如果fileInSubDir是零,而我已经创建了三个文件之前,所以它必须是fileInSubDir的长度是3,而不是零
请帮我:(
有一堆用于查找独立存储的工具。确保你已经成功保存了这三个文件。 – Ku6opr