Using async await in for loop in C#

Below is an example of using async await in for loop in C#:

        public async Task DoSomethingInForAsync()
        {
            var collection = await YourListCallerMethodAsync();
            var tasks = new List<Task>();

            for (int i = 0; i < collection.Count; i++)
            {
                var task = DoSomethingElseInForAsync(item[i]);
                tasks.Add(task);
            }

            await Task.WhenAll();
        }