Async and Await in C#: Practical Examples and Common Mistakes
How async and await work in C#, how to run several operations at once with Task.WhenAll, how to cancel them, and the mistakes that cause deadlocks and lost exceptions.
How async and await work in C#, how to run several operations at once with Task.WhenAll, how to cancel them, and the mistakes that cause deadlocks and lost exceptions.
How yield return and yield break turn a method into a lazy iterator in C#, with examples, async iterators, and the traps around deferred execution.
Send email with attachments through Gmail from C# using MailKit and an app password, plus the OAuth 2.0 option and notes on legacy SmtpClient code.
Outlook.com and Hotmail no longer accept passwords over SMTP. Send email with attachments from C# using MailKit and an OAuth 2.0 token from MSAL.
Send email with attachments through Yahoo Mail’s SMTP server from C# with MailKit and a Yahoo app password, without hard-coding credentials.