Re: difference between method overridding and method over loading

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Overloading is the technique of defining the same method with different
signatures, such as one version which takes a string as a parameter, another
which takes a string and a bool, and another which takes an integer. This
can be done in the same class, or in an inherited class. Overriding is the
techique of re-defining an inherited method or property with the same
signature, which is already defined with the virtual modifier in a base
class. If the base class method or property is not virtual, it is called
"hiding" rather than "overriding."

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.

<Ratnakar .N> wrote in message
news:%23tw0eXF8GHA.4408@xxxxxxxxxxxxxxxxxxxxxxx
HELLO,
Please tell me the main difference between method overriding and
method overloading

Thank you


.



Relevant Pages

  • Re: i18n - and 2-headed strings?
    ... Unfortunately, when I designed overloading, I did not think *at ... all* about overloading objects with string semantic. ... of getting an error message which essentially says: ... overloaded object. ...
    (comp.lang.perl.misc)
  • Re: Declaration design preference: type or name first
    ... the compiler defaults to integer. ... Haskell uses type classes to handle overloading. ... that is an instance of the Num type class and returns a value of the ... This would make it illegal to apply f to, say, a string, ...
    (comp.lang.misc)
  • Re: Dose C#2.0 support optional parameters
    ... public void Show(params string[] message){ ... John didn't decide this was a retrograde step. ... where I would consider optional parameters to be *better than overloading." ... would consider optional parameters to be *better than overloading'. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How can I insert the default Outlook signature into a document
    ... Instead of assuming that the signatures will be on drive C: ... ByVal lpUserName As String, ... 'Buffer size for the return string. ...
    (microsoft.public.word.vba.general)
  • Re: How good is PERL at searching ASCII files?
    ... The key elements being the string CONVERT, ... parens in quotes will *not* be ignored as they should. ... Please don't top-post and please don't quote signatures (top-posting ... function in 'perldoc -f open'. ...
    (comp.lang.perl.misc)