prasanna p

prasanna p

  • 1.3k
  • 470
  • 105.1k

how to loop async method using for loop

Oct 26 2022 12:33 AM

hi friends,

I am looping  insert method but for loop is not working properly,it is coming out from the loop continuously not executing.

if(date==dbdate)

{

Insert(fromdate,date,token);

}else

{

for((int i=1;i<=4;i++)

{ fromdate=date.AddDays(i).ToString("yyyy-MM-dd");

Insert(fromdate,date,token);

} }

Public async void Insert((string fromdate,DateTime dt,string token){

}

Please tell me how to do this one?


Answers (1)