Category: .NET
-

String manipulation in C# and .NET: The complete guide
Strings are one of the most frequently used data types in C#. Whether you’re developing a small utility or a complex enterprise application, string manipulation plays a crucial role.
-

String interning in .NET
String interning in .NET is an optimization technique used by the Common Language Runtime (CLR) to reduce memory usage and improve performance when working with string literals.
-

Immutable strings in C#: Why strings cannot be changed
Have you ever wondered why strings in C# behave differently from other data types? You concatenate strings, replace characters, and manipulate them in various ways, yet each operation seems to create a new string rather than modify the existing one.
-

The Result Pattern in C#: A comprehensive guide
The Result Pattern is a powerful approach in software development that helps handle error scenarios gracefully while making the code easier to read and maintain.
-

Zero allocation techniques in C#: Using ref struct and readonly struct
One effective way to optimize your C# code is by employing zero-allocation techniques. In this article, we’ll discuss two powerful tools available in C# for this purpose: ref struct and readonly struct.
-

Asynchronous Patterns beyond async/await: Task Parallel Library and Dataflow Blocks
In modern software development, asynchronous programming has become essential for creating responsive, scalable applications. In C#, async/await is often the first tool that developers reach for when dealing with asynchrony. However, there are scenarios where other asynchronous patterns, such as the Task Parallel Library (TPL) and Dataflow Blocks, can be more effective. In this article,…
-

A clear comparison between Class and Record in C#
Discover the key differences between Classes and Records in C# and learn when to use each. From immutability to value-based equality, this article explores the advantages of records over traditional classes, supported by clear explanations and code examples.
-

Generate unique file names in C#
In C# development, generating unique file names is crucial to avoid conflicts. Using `Guid.NewGuid()`, you can create unique file names with ease. This article explores how to use GUIDs for file naming, ensuring consistency and preventing overwrites in your applications.
-

Understanding System.String, String, and string in C# – What’s the Difference?
In C#, strings are essential for working with text, but the distinction between System.String, String, and string often causes confusion. In this article, we’ll explore the differences, helping you understand how these terms relate and when to use each one. Discover why string is the most popular choice in C# development, the role of System.String,…
-

The dark side of the GUID
In this article we are going to deep dive in a very old battle: GUID vs INT and try to understand what are the benefits from each one. Introduction When a CPU processes data, the size of the data being processed—such as a GUID (128-bit) versus an INT (32-bit)—has a significant impact on the efficiency…