Advanced C# Tips: Using Array Segments Instead of Copying Arrays
Even though it is not a very popular C# tool, the ArraySegment<T> is quite old and it was introduced in .NET Framework 2.0, which was released in 2005. It is…
Even though it is not a very popular C# tool, the ArraySegment<T> is quite old and it was introduced in .NET Framework 2.0, which was released in 2005. It is…
Reusing objects in C# is a strategy that aligns with the principles of efficient memory management and application performance optimization. This concept is important in environments where memory resources are…
ArrayPool<T> in C# is a very useful but a less known feature. It has been around since .NET 2.0 but has never been popular. In order to understand ArrayPool, we…
Bitwise operators in C# are special tools that let you work directly with the individual bits of a number’s binary representation. If you are reading this blog post, I assume…
Exceptions in C# are definitely a great facility but we need to use them wisely. We should leave the least possible probabilities of throwing an exception since exceptions come with…
In C#, understanding the difference between value types and reference types is a fundamental topic when writing efficient and performant code. The choice between using a value type (like a…
Before diving into topic, I want to begin with clarifying the terminology. Immutable data refers to data whose state cannot be modified after it has been created. Once an immutable…
In C#, the in parameter modifier is relatively a recent addition. It added in C# 7.2. The main point of in keyword is to pass a large value type to…
The title could have also been “Don’t use unsafe code at all!” You will come to the same conclusion after reading this post, but still I gave a room for…