Mocking MessageBox (or any static class) in WinForms Unit testing a WinForms app is an uphill battle in the best of times, before you add in classes like MessageBox. Let's make the best of it.
Using nameof to avoid magic strings in C# There's a lot of ways to make our code work for us. Let's check out using the nameof operator to avoid magic strings.
Why am I getting a "Please complete the security check" error? I visited a page the other day and saw something odd.. a page that said it was checking my browser. It's unpolished and unfriendly, and my first instinct was to just close the tab and forget it. Then I dropped to the bottom of the page and noticed the link to Cloudflare. Interesting.
Sunk costs, timeboxing, and asking for help One of the biggest struggles I have with programming is knowing when to ask for help. A little struggle is necessary for growth, but when am I just wasting time when I could be learning from others?
A more helpful exception box for WinForms apps If you're in a legacy codebase with a centralized "message box" form, why not add some features that make it work for you? 😏
Every software dev is a contractor Seeing my full-time job as a long-term contract has helped me improve and contribute, without taking things personally or falling into complacency.
How to log errors in WinForms using NLog Logs are a great tool for squashing bugs and tracing errors. Let's see how to add NLog to our project.