Blog

Page 522 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Concat all strings inside a List<string> using LINQ
c#

Concat all strings inside a List<string> using LINQ

Published on September 2, 2023

# 🧩 A Complete Guide to Concatenating Strings in a List using LINQ 🧩 Are you tired of manually concatenating strings in a `List<string>` with a delimiter? šŸ™„ Look no further! In this blog post, we'll explore an easy and efficient solution using LINQ exp

Cover Image for Best practice to call ConfigureAwait for all server-side code
async-awaitc#

Best practice to call ConfigureAwait for all server-side code

Published on September 2, 2023

# Best practice to call ConfigureAwait for all server-side code šŸ¤” Are you working with server-side code that involves asynchronous functions? Do you want to optimize the performance of your code while avoiding potential problems? Then you might have come

Cover Image for When to use static classes in C#
c#classstatic

When to use static classes in C#

Published on September 2, 2023

# When to Use Static Classes in C# Static classes in C# can be very useful in certain scenarios. They provide a way to organize methods that are not associated with specific objects, and can make your implementation simpler and faster. However, it's impor

Cover Image for SqlException from Entity Framework - New transaction is not allowed because there are other threads running in the session
c#inversion-of-control

SqlException from Entity Framework - New transaction is not allowed because there are other threads running in the session

Published on September 2, 2023

# 🚨 Solving the "New transaction is not allowed because there are other threads running in the session" error 🚨 If you're encountering the `SqlException` with the message "New transaction is not allowed because there are other threads running in the ses

Cover Image for C# Interfaces. Implicit implementation versus Explicit implementation
c#.net

C# Interfaces. Implicit implementation versus Explicit implementation

Published on September 2, 2023

šŸ“ **C# Interfaces: Implicit Implementation vs Explicit Implementation** Have you ever wondered about the differences between implementing interfaces implicitly and explicitly in C#? šŸ¤” In this blog post, we will dive into this question and provide easy s

Cover Image for How do I make a textbox that only accepts numbers?
c#.net

How do I make a textbox that only accepts numbers?

Published on September 2, 2023

šŸ“ Title: "How to Create a Number-Only Textbox in your Windows Forms App" Introduction: šŸ‘‹ Hey there! Are you struggling to figure out how to make a textbox in your Windows Forms app that only accepts numbers? Look no further, because we've got you covere

Cover Image for How do you do a deep copy of an object in .NET?
c#clone.netserialization

How do you do a deep copy of an object in .NET?

Published on September 2, 2023

# Title: "Mastering the Art of Deep Copy in .NET: A Hassle-Free Guide šŸŽÆ" --- ## Introduction So, you want to perform a **deep copy** of an object in the .NET world, huh? You've come to the right place! šŸš€ Java may have made it easy, but worry not, my

Cover Image for Func delegate with no return type
c#.net

Func delegate with no return type

Published on September 2, 2023

# šŸ¤” Func Delegate with No Return Type? Can It Be Done? So you're working with C# and you've heard about the handy `Func` delegates that can be used with methods to return a value. But what about those times when you need to work with methods that don't r

Cover Image for Difference between InvariantCulture and Ordinal string comparison
c#.net

Difference between InvariantCulture and Ordinal string comparison

Published on September 2, 2023

# Understanding the Difference between InvariantCulture and Ordinal String Comparison šŸ’„šŸ” <p>So, you want to compare two strings for equality in C#, but you're not sure whether to use InvariantCulture or Ordinal comparison. Fear not, my fellow tech enthu

Blog | Matheus Mello