C# internal

The internal keyword is an access modifier for types and type members. Internal types or members are accessible only within files in the same assembly. The type or member can be accessed by any code in the same assembly, but not from another assembly.

C# enum

In C#, enum is a value type data type. The enum is used to declare a list of named integer constants. It can be defined using the enum keyword directly inside a namespace, class, or structure. The enum is used to give a name to each constant so that the constant integer can be referred using... » read more

Do While Loop

The do-while loop executes the block of code repeatedly. The do-while loop execute the code at least once. It includes the conditional expression after the code block and the increment/decrement step should be inside the loop. Use the break keyword to stop the execution and exit from a do-while loop. An nested do-while loop is allowed.

C# MultiThreading and Lock

When working with a multithreading application it is very important for developers to handle multiple threads for a critical section of code. Monitor and lock is the way to provide thread safety in a multithreaded application in C#. Both provide a mechanism to ensure that only one thread is executing code at the same time... » read more

C# Multi-dimension Array

// Two-dimensional array. int[,] array2D = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } }; // A similar array with string elements. string[,] array2Db = new string[3, 2] { { "one", "two" }, { "three", "four" }, { "five", "six" } }; // Three-dimensional... » read more

Immutable Type

An immutable type, in the context of C#, is a type of object whose data cannot be changed after its creation. An immutable type sets the property or state of the object as read only because it cannot be modified after it is assigned during initialization. Immutable types are designed for efficient memory management and better speed,... » read more