IAsyncEnumerable<string> 小记

var list = new List<string>() { "1", "2", "3" };
var data = list.AsEnumerable();
var asyncEnum = data as IAsyncEnumerable<string>;
await foreach (var e in asyncEnum)
{
yield return e;
}

posted on 2020-09-23 10:21  Ssumer  阅读(219)  评论(0编辑  收藏  举报

导航