每当我尝试这段代码时:
foreach (StorageFile filesAsync in await folderFromPathAsync.GetFolderAsync(_selectedPlayList).GetFilesAsync())//Error here
{
this._fileNames.Add(filesAsync.Name.Substring(0, filesAsync.Name.LastIndexOf('.')));
this.FilesListBox.Items.Add(filesAsync.Name.Substring(0, filesAsync.Name.LastIndexOf('.')));
this._pathNames.Add(filesAsync.Path);
}
由于某些奇怪的原因,GetFilesAsync() 的定义不存在。这是我的错吗?我的完整错误信息:
'Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder>'
不包含“GetFilesAsync”的定义,并且找不到接受“Windows.Foundation.IAsyncOperation”类型的第一个参数的扩展方法“GetFilesAsync”(您是否缺少 using 指令或程序集引用?)
请帮我