Good morning everyone, I have the following doubt, when clicking on a button my program does with if you run 2 methods simultaneously, method of sending email, and method of generating the pdf, it happens that the method of sending email always ends before, by example:
anexos.Add(new MemoryStream(PDF));
When it comes to this part of the function to send the email, the variable "PDF" has not yet been created because the function of generating the PDF has not finished yet, I needed a way to make it somehow, the send email function will wait for the PDF to be generated. If anyone can help thank you.