c# – Method Overloading: Have two or methods of the same name

Method Overloading is basically a technique that lets you have different versions of the same method, where each version of the method does a different thing. It essentially makes methods more versatile. Each version of the method accepts different/types of input parameters. The way you control which of version method […]Read more »

c# – Create a read-only property (aka a constant)

So far we have looked at 5 ways to store data in a class’s object (aka an instance) in the form of “properties”. Of which one of the recommended ways of setting values to properties, is by using the constructor method, e.g.: Now lets say all the employees of the […]Read more »

c# – Methods, Classes, and Namespaces

When programming it is essential to organize and structure your code, otherwise it will become unwieldy to work with. c# offer a number of ways to structure and and organize our code using: methods classes namespaces Methods are used for storing blocks of codes and each method is designed to […]Read more »

c# – Adding comments to your code

It is always good practice to insert comments into your code so that you (as well as others) can understand what your code is doing. You can place a single line comment after a line of code, or on a line of it’s own using the “//” notation. If you […]Read more »

c# – Hello World

Here we are going to first show you a simple “hello world” program in the form of an exe file. When you double-click on the exe file, all that will happen is that a console terminal will open a display the message “hello world”, like this:   Step 1 -Write […]Read more »

c# – What you should already know

You should already be familiar with the following: Variables Conditonal construct, e.g. If statements Conditional Operators, regular expressions wild cards