CheckedChanged question

  • Thread starter Thread starter Patrick De Ridder
  • Start date Start date
P

Patrick De Ridder

What is the effect of the following line?
checkBox1_CheckedChanged(null,null);
Thanks,
Patrick.
 
YOu probably won't notice a difference unless you are interrogating either
the sender, eventargs. It'll still behave just like anything else, except
that those two thing will be null, so you won't know what triggered the
event or any of the event args. Off the top of my head, I'm not sure what
benefit you'd derive from doing this but I don't think it would hurt except
that it goes against the whole sender/notification paragidm.
 
What does the line actually do?
Patrick.

William Ryan said:
YOu probably won't notice a difference unless you are interrogating either
the sender, eventargs. It'll still behave just like anything else, except
that those two thing will be null, so you won't know what triggered the
event or any of the event args. Off the top of my head, I'm not sure what
benefit you'd derive from doing this but I don't think it would hurt except
that it goes against the whole sender/notification paragidm.
 
It's just like a function call... I could call a Sum function which takes
in two arguments Sum(1, 1) or 0,0. You need to pass in something b/c it's
expecting something (object and eventargs) but you don't have to do anythign
with them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top