1
Good morning, you guys, I am with the following doubt, when clicking a button my program makes to execute 2 methods simultaneously, method of sending email, and method of generating the pdf, it happens that the method of sending email always ends before, for example:
anexos.Add(new MemoryStream(PDF));
When it arrives at this part within the function of sending 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 somehow, the function of sending email wait for the PDF to be generated. If anyone can help, thank you.
It makes sense to run the methods simultaneously if one needs to wait for the other to finish?
– Jéf Bueno
So it’s just that the structure is a bit messy and that’s the only way I could make rsrs
– Brayan
Vc is using async await?
– Thiago Lunardi