Blog
Page 189 of my articles, tutorials, and thoughts
Latest Articles
Is there a difference between "throw" and "throw ex"?
# Is there a difference between "throw" and "throw ex"? ๐ค Hey there, tech enthusiasts! ๐ Let's dig into a question that has sparked some debate among developers: Is there a difference between "throw" and "throw ex"? ๐ค In this blog post, we'll address t
If my interface must return Task what is the best way to have a no-operation implementation?
# How to Create a No-Operation Implementation with `Task.Delay(0)` ๐ Hey there, tech enthusiasts! Today we're going to dive into a common question many developers encounter while working with interfaces that must return a `Task`. Specifically, we'll addr
Cleanest way to write retry logic?
๐ Cleanest way to write retry logic? ๐ So, you need to retry an operation several times before giving up? We've all been there! Whether it's making network requests, connecting to databases, or performing any action with a potential for failure, retryin
How do I specify the exit code of a console application in .NET?
๐ Hey there, tech wizards! ๐ฎ So you've got a ๐ปconsole application in .NET๐ก and you're trying to figure out how to specify the "exit code" for it? ๐ค Look no further because I've got you covered! ๐ Let's break it down and get to the bottom of this qu
How to use LINQ to select object with minimum or maximum property value
# How to Use LINQ to Select Objects with Minimum or Maximum Property Value ๐ Do you have a Person object with a nullable DateOfBirth property and want to find the one with the earliest or smallest DateOfBirth value? Fear not, LINQ is here to save the day
C# Set collection?
# C# Set Collection: Simplify Your Life with HashSet ๐งฉ Are you tired of searching for the perfect equivalent of Java's `Set` collection in C#? Look no further! In this guide, we'll explore common issues, easy solutions, and introduce you to the powerful
Can"t specify the "async" modifier on the "Main" method of a console app
๐ **Title**: Running Code Asynchronously in the Main Method of a Console App: Easy Solutions Are you new to asynchronous programming and wondering how to make your Main method of a console application run asynchronously? ๐ง Don't worry, we've got you cov
How do I exit a WPF application programmatically?
๐ฅ๏ธ๐ ๐๐ป Exiting a WPF Application Programmatically: The Ultimate Guide ๐ โโ๏ธ๐ฅ๏ธ So, you want to know how to exit a WPF application programmatically, huh? You're not alone! Many developers have struggled with this issue and found themselves scratching th
How do I run Visual Studio as an administrator by default?
## ๐ How to Run Visual Studio as an Administrator by Default So, you're a tech-savvy individual who loves using Visual Studio for all your coding needs. But here's the thing - even though you're logged into your personal laptop as an administrator, Visua






