Category: C#

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

Method Hiding in C# with Example

As per inheritance in C#, derived class have access to all the code available in base class, which means all the public methods available in the base class are accessible through derived class object.  But in some cases, derived class contains a method which is similar by name and signature to the method available in