--- Comment #17 from Steven Schveighoffer <>  2009-07-10 
06:15:14 PDT ---
(In reply to comment #14)
> Strange. I thought overloading and overriding work in different ways, e.g.
> foo(int) and foo(long) can be overloads, but not overrides.

That's exactly what Walter means.

He doesn't want to have to support this kind of contravariance:

class X {}
class Y : X {}

class C
  void foo(Y y) {}

class D : C
  override void foo(X x) {}

Should be technically valid, since calling the base function still works on the
derived version (A Y is always an X).  I think personally, this kind of
contravariance provides little benefit, but being able to implicitly cast
delegates (or function pointers) is much more useful because you use them as
variables, which typically enjoy implicit conversion when passing as

I don't share his opinion that doing this only for delegates is a hack.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to