Shadman Kudchikar

C# String

C# String Manipulation, String Constructors, String Assignment, And The StringBuilder Class

Why is string manipulation so important? Because, as programmers, we do so much of it. In fact, on some days, it seems that everything is string manipulation. If you know how to program with strings, you’re a great way along the journey to becoming a powerful programmer. Fortunately, C# provides facilities for working with and manipulating strings. In this tutorial we will learn the types and methods related to strings, so that you can make short work of most common string-manipulation tasks in your projects.

Memory Leak C#

Memory Leak C#

Contents

What Is A Memory Leak?

In general, a memory leak is a process in which a program or application persistently retains a computer’s primary memory. It occurs when the resident memory program does not return or release allocated memory space, even after execution, resulting in slower or unresponsive system behavior.

In unmanaged code, a memory leak is a failure to release unreachable memory, which can no longer be allocated again by any process during execution of the allocating process. This can mostly be cured by using GC (Garbage Collection) techniques or detected by automated tools.

Repository Pattern C#

Repository Pattern C#

Contents

What Is Repository Pattern C# ?

A Repository mediates between the domain and data mapping layers (like Entity Framework). It allows you to pull a record or number of records out of datasets, and then have those records to work on acting like an in-memory domain object collection, and you can also update or delete records within those data set, and the mapping code encapsulated by the Repository will carry out the appropriate operations behind the scenes.

Null Coalescing Operator C#

Null Coalescing Operator C#

The ?? operator is also known as the null-coalescing operator. It returns the left side operand if the operand is not null else it returns the right side operand. This article explains what is nullable types, the null coalescing operator, and unique ways to use the null-coalescing operator in C#.

Contents

C# Nullables

A reference type can have an actual value of null, meaning it has no value. A value type can’t have a value of null.

For example, how would you express that some boolean value is true, false, or unknown? Regular Boolean can be only true or false.