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