Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- From: Jeroen Mostert <jmostert@xxxxxxxxx>
- Date: Fri, 12 Sep 2008 07:01:46 +0200
Marc Gravell wrote:
Good analysis - one point, though:Oops, you're right, of course. Changing around things a little too enthusiastically to pin down the root cause.
"Change this to object o = failer + delegate..."
With the code as originally presented (MulticastDelegate), you'd need
to type the delegate:
o = failer + (EventHandler) delegate {...};
Of course, a better option would be to declare something more specificYes, using MulticastDelegate is pretty fishy -- I can't remember a single occasion where I had a need to explicitly declare that.
for the "del" argument - perhaps using the Action<...> or Func<...>
family to clarify the intent (EventHandler is fine too...).
--
J.
.
- Follow-Ups:
- Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- From: jehugaleahsa@xxxxxxxxx
- Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- References:
- When Overloading the Plus Operator, What are Valid Arguments Types?
- From: jehugaleahsa@xxxxxxxxx
- Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- From: Jeroen Mostert
- Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- From: Marc Gravell
- When Overloading the Plus Operator, What are Valid Arguments Types?
- Prev by Date: Re: isJavaIdentifierPart(search.charAt(idx))
- Next by Date: Re: Explanation of object equality.
- Previous by thread: Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- Next by thread: Re: When Overloading the Plus Operator, What are Valid Arguments Types?
- Index(es):
Relevant Pages
|
Loading