I have this function that reads files from a location and reads the content and send email to the person associated with that file. I am using for loop to iterate through those files and it works fine but recently i happened to check the logs and found something weird. While it was processing this one file , it jumps to the next iteration without finishing the existing process by which i mean the function i am calling. i am not using anything async.
for (int i = 0; i < l; i++)
{
//Generate Pdf and Send email or Fax as per Customer Profile
functionABC(taskFiles[i].Name.ToString());
}
I am writing logs also in this fucnitonABC. I checked the logs it break in that middle and moved to the next iteration. Don't know why..