示例#1
0
        private async Task DoSomethingAsync()
        {
            await Task.Delay(1000);

            ProductCollection = null; // await getprodasync.... pretend u take data from db
            await Task.Run(() =>
            {
                // await getprodasync...
            });

            ProductCollection.AsParallel().ForAll(e => e.ProductName = "a");
        }