I have a for loop and inside this for loop, it has a void method which would generally take time.
I want to run this void method in an async way and want to call printFinalMessage() after doStuff(ele) is completed for all the ele in list.
for (int ele in list)
{
doStuff(ele);
}
printFinalMessage()
Would appreciate any help.