Ref and Out Keywords in C#

In this article, we will talk about the ref and out keywords in C#.

Introduction:

Before talking about ref and out keyword let`s first talk about how parameters are passed to a method in C#. By default when we pass parameter to a method it is passed by value (copy of the data is passed to a method). But exactly what is copied depends on whether the type is value type or reference type. Int, char, double, decimal, enum etc are built in value types in C# and class, object, delegate, string etc are built in reference types in C#.

Read more

Access Modifiers in C#

In this article, we will talk about access modifiers in C#. Let`s get started.

Introduction:

Encapsulation is one of the pillars of object oriented programming. Encapsulation means ability to hide the unnecessary implementation details from object user. Encapsulation is implemented by using access modifier. Access modifier defines the visibility of type as well as members of type to other part of the application.

Read more

Const vs. Readonly Keywords in C#

In this article, we will talk about two most commonly used keywords “const” and “readonly” and the difference between them. Let`s get started.

Read more