J'ai un problème quand je veux obtenir la liste des fichiers dans un répertoirewindows phone 7 fichier Listing IsolatedStorage
c'est mon code
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)
{
}
longueur
si fileInSubDir est égal à zéro, alors que je l'ai créé trois fichiers avant, il doit donc être la longueur de fileInSubDir est trois, zéro
s'il vous plaît aidez-moi :(
Il y a un tas d'outils pour regarder vers un stockage isolé. Assurez-vous que vous avez enregistré avec succès ces trois fichiers. – Ku6opr