Blog

Page 170 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to verify that method was NOT called in Moq?
c#.net

How to verify that method was NOT called in Moq?

Published on September 2, 2023

# ๐Ÿ•ต๏ธโ€โ™€๏ธ 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

Cover Image for How do I fix the Visual Studio compile error, "mismatch between processor architecture"?
.net

How do I fix the Visual Studio compile error, "mismatch between processor architecture"?

Published on September 2, 2023

๐Ÿ“ **Tech Blog** ๐Ÿ–ฅ๏ธ ๐Ÿ“Œ **Title:** How to Fix the Visual Studio Compile Error: "Mismatch Between Processor Architecture" ๐Ÿ“… **Published on:** [insert date] ๐Ÿ—จ๏ธ **Author:** [insert name] --- ๐Ÿ‘‹ Hey there, fellow developer! ๐Ÿ‘จโ€๐Ÿ’ป Are you struggling wi

Cover Image for Is there a difference between "throw" and "throw ex"?
c#exception.net

Is there a difference between "throw" and "throw ex"?

Published on September 2, 2023

# 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

Cover Image for If my interface must return Task what is the best way to have a no-operation implementation?
async-awaitc#.net

If my interface must return Task what is the best way to have a no-operation implementation?

Published on September 2, 2023

# 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

Cover Image for Cleanest way to write retry logic?
c#.net

Cleanest way to write retry logic?

Published on September 2, 2023

๐Ÿ” 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

Cover Image for How do I specify the exit code of a console application in .NET?
c#.net

How do I specify the exit code of a console application in .NET?

Published on September 2, 2023

๐Ÿ‘‹ 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

Cover Image for How to use LINQ to select object with minimum or maximum property value
c#.net

How to use LINQ to select object with minimum or maximum property value

Published on September 2, 2023

# 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

Cover Image for C# Set collection?
c#collections.net

C# Set collection?

Published on September 2, 2023

# 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

Cover Image for Can"t specify the "async" modifier on the "Main" method of a console app
asynchronousc#.net

Can"t specify the "async" modifier on the "Main" method of a console app

Published on September 2, 2023

๐Ÿ“ **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

Cover Image for How do I exit a WPF application programmatically?
c#.net

How do I exit a WPF application programmatically?

Published on September 2, 2023

๐Ÿ–ฅ๏ธ๐Ÿ™…๐Ÿ”š๐Ÿ’ป 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