RE: Should this type of method overload work in C#?
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Wed, 20 Apr 2005 19:14:06 +0100
Dave Raskin <DaveRaskin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Ok, here's an example of where it fails. This has an added wrinkle of another
> virtual method - Process().
<snip>
Overload resolution is done at compile time - it works out the
*signature* of which method will be called. Now, the Process method is
calling
this.service.Send(this)
and all it knows about "this" is that it's a BaseDerived - so it
doesn't know it can call Send(DerivedDerived).
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- RE: Should this type of method overload work in C#?
- From: Dave Raskin
- Re: Should this type of method overload work in C#?
- From: Bruce Wood
- RE: Should this type of method overload work in C#?
- References:
- Should this type of method overload work in C#?
- From: Dave Raskin
- RE: Should this type of method overload work in C#?
- From: Dave Raskin
- Should this type of method overload work in C#?
- Prev by Date: Re: Get path for install service
- Next by Date: resource not found error
- Previous by thread: RE: Should this type of method overload work in C#?
- Next by thread: Re: Should this type of method overload work in C#?
- Index(es):
Relevant Pages
|