A exception is happen when calling GetFilesAsync with parameter of CommonFileQuery.OrderByDate.
this is my code and exception.
------------------------------------------------------Exception--------------------------------------------------------------------
A first chance exception of type 'System.ArgumentException' occurred in Apps.WindowsPhone.exe
System.ArgumentException: Value does not fall within the expected range.
at Windows.Storage.StorageFolder.GetFilesAsync(CommonFileQuery query)
at Apps.RecentDevManger.<RemoveOldestDev>d__0.MoveNext()
-------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------Code-------------------------------------------------------------------
try
{
StorageFolder LocalFolder = ApplicationData.Current.LocalFolder;
StorageFolder Folder = await LocalFolder.CreateFolderAsync("test", CreationCollisionOption.OpenIfExists);
IReadOnlyList<StorageFile> FileList =
await Folder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByDate);
return FileList;
}
catch(Exception e)
{
Debug.WriteLine(e.ToString());
return null;
}
----------------------------------------------------------------------------------------------------------------------------------------------------------