Author: Krishnaa

Method Overloading in C# with Example

We know very well how to create methods in C#.  We basically create methods to increase the code reusability.  Suppose if you want to add 2 numbers, you can create a method by the name of add_number with 2 parameters of type integer.  Same goes in case of adding or concatenating 2 strings, you can

Params Parameter Modifier in C# with Example

An another parameter modifier is params keyword.  Like out and ref parameter modifier in C#, we have to use it in method declaration, but we don’t need to use params keyword while passing the method arguments.  Params keyword is only used in front of arrays and it should be the last parameter in your method

Out Parameter Modifier in C# with Example

An another parameter modifier is out, which we use when we are expecting more than 1 output from a method.  Normally, a method return only 1 type of value depending upon the return data type like string, int, array etc.  In this case, you can create multiple variables of different data types to store the

What is Method Overriding & Polymorphism in C#?

What is Method Overriding? In method hiding in C#.Net, we have seen how to use new keyword in derived class method to hide the base class method.  Also, we know that derived class object will always call to its own method in case of method hiding.  But if we create a base class reference variable