I use recursive function to do something
public async void walk(StorageFolder folder)
{
IReadOnlyList<StorageFolder> subDirs = null;
subDirs = await folder.GetFoldersAsync();
foreach (var subDir in subDirs)
{
var dirPath = new Profile() { FolderPath = subDir.Path};
db.Insert(dirPath);
walk(subDir);
}
tbOut.Text = "Done!";
}
So, I want that tbOut.Text = "Done!"; will be done only after all iterations ends. At now it's happenning at the same time while iterations under process. If I run this function like that
walk(fd);
tbOut.Text = "Done!";
the result still the same. How to wait when this function will ends completely?