Few basics of OOP for C#
1. Overloading: points to be remembered
A method with same name but differentiated on below:
-Number of Parameter of method
-Sequence of parameter of method
-Type of parameter of method (Ex. int, string....etc)
But does not matter is:
-return type is not part of Method Overload
2. Abstract class: points to be remembered:
-Can not instantiate
-Should have access specifier (public...private can not be abstract class)
-Class contains at least one abstract method, class must be declared as an abstract class (by putting abstract keyword before class name)
-Can have methods with implementation (normal methods)
-Can have methods without implementation (with abstract keyword Ex. public abstract void Method())
1. Overloading: points to be remembered
A method with same name but differentiated on below:
-Number of Parameter of method
-Sequence of parameter of method
-Type of parameter of method (Ex. int, string....etc)
But does not matter is:
-return type is not part of Method Overload
2. Abstract class: points to be remembered:
-Can not instantiate
-Should have access specifier (public...private can not be abstract class)
-Class contains at least one abstract method, class must be declared as an abstract class (by putting abstract keyword before class name)
-Can have methods with implementation (normal methods)
-Can have methods without implementation (with abstract keyword Ex. public abstract void Method())
Comments
Post a Comment