In this post, I will cover Private and Static Constructors in C#. Private constructors restrict the creation of objects. In fact, if the private constructor is there, you cannot create objects in a similar fashion. You can only use private constructors inside some method of that class only. In contrast, if you define a constructor […]
C#
Constructors in C#
Constructors in C# create the objects. Basically, the compiler provides a special function in a class called a constructor which it invokes automatically on the creation of an object. In this post, you will learn three types of constructors used in C# programming language – the default constructor, parameterized constructor, and the copy constructor. However, […]
C# Arrays
C# Arrays refer to the collection of several values all belonging to the same data type. I will explain C# Arrays with a few simple examples. So, if even if you are not familiar with other programming languages, you will not have any difficulty in understanding. Let us discuss the declaration syntax first. Array Declaration […]
C# Examples
In this post you will learn few simple C# Examples. Specifically, you will get know basic language constructs like conditional statements and looping statements. The conditional elements allow us to decide the course of action on the basis of a condition being true or false. In C#, there are two conditional statements – if … […]
How to Create a C# Console Application
In this post, I will explain how to create a C# console application. As a matter of fact, Visual Studio makes it a lot easier to develop and run the applications. In general, the .NET framework supports many programming languages and C# is one among them. Although, we can use C# to create many different […]