GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 354 of 436    Print  
You have an event handler called MyEvent and you want to link the click event of control, MyButton, to use MyEvent, what is the code that will like them together?

  
Total Answers and Comments: 3 Last Update: May 02, 2008     Asked by: oclaros1 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 15, 2006 03:14:06   #1  
Gupta        

RE: You have an event handler called MyEvent and you w...
control.Click + new EventHandler(MyEvent)
 
Is this answer useful? Yes | No
April 06, 2008 22:03:36   #2  
vshylaja Member Since: April 2008   Contribution: 10    

RE: You have an event handler called MyEvent and you want to link the click event of control, MyButton, to use MyEvent, what is the code that will like them together?
MyButton.Click + new EventHandler(MyEvent);

is the correct line of code since the control name is MyButton.

 
Is this answer useful? Yes | No
May 02, 2008 14:54:28   #3  
annalipa Member Since: April 2008   Contribution: 3    

RE: You have an event handler called MyEvent and you want to link the click event of control, MyButton, to use MyEvent, what is the code that will like them together?
MyEvent + new EventHandler(MyButton.Click);
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape