Checking sender for null

  • Thread starter Thread starter mick
  • Start date Start date
M

mick

Been playing around with ReSharper for a couple of days and noticed that
it prompts me to check sender for null in handlers. This is something I don't
usually do but wondered if it was possible for sender to be null? What do the
more experienced programmers amongst you do?

mick
 
"Peter Duniho" wrote in message

Been playing around with ReSharper for a couple of days and noticed that
it prompts me to check sender for null in handlers. This is something I don't
usually do but wondered if it was possible for sender to be null? What do the
more experienced programmers amongst you do?
It depends on the event implementor, but it's definitely possible in theory
for "sender" to be null. The parameter is just another argument passed by...
<snip>

Thanks for taking the time to reply Pete.

mick
 
Back
Top