c#

# The Proper Way to Rethrow an Exception in C# ๐ Welcome to my tech blog! Today, we're diving into an important question in C#: what is the proper way to rethrow an exception? ๐ค We'll explore two common approaches and discuss which one is better. Let's

# ๐ต๏ธโโ๏ธ How to Verify that a Method Was NOT Called in Moq ๐ต๏ธโโ๏ธ Do you ever find yourself in a situation where you need to make sure that a specific method was **not** called while using Moq? ๐ค It's not uncommon for us to overlook this requirement, but

# 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

๐ 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 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