Method Overriding and Method Overloading Differnce with simple example
-
Hi, What is differnece between Method Overlaoding and Method overriding in C#.net .Is that true overriding only allows in Inheritance ? Best Regards Rameez
-
Hi, What is differnece between Method Overlaoding and Method overriding in C#.net .Is that true overriding only allows in Inheritance ? Best Regards Rameez
Method Overloading
It is possible to define the same function twice while using different parameters for each definition.
A same named function is defined more than once in your program resulting an overloading of function.Method Overriding
A class may override an inherited virtual method by declaring a method with the same name and signature, and marking the declaration with the override modifier.
override modifier replaces the inherited implementation of the method.
A DATAPOST COMPUTER CENTRE (K.V Prajapati)
-
Hi, What is differnece between Method Overlaoding and Method overriding in C#.net .Is that true overriding only allows in Inheritance ? Best Regards Rameez
Any beginners' book will explain that.
-
Any beginners' book will explain that.
Thanks for reply , One more question Method overriding only possible in Inheritance or we can also use it in Polymorphisim ? Best Regards