coding for delegates?

Answer Posted / navin c. pandit

Here is the code how to add a delegate:-

Button_Id.OnClick += new EventHandler(function_name());

where function_name() is the name of the method that you
want to call.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are strongly typed objects?

485


What are generic types?

500


Is c# an open source?

497


What is the difference between Static, Const and read only?

544


Why do we need delegates in c#?

496






Is null c# operator?

547


Which controls do not have events?

560


who is a protected class-level variable available to?

546


Explain the difference between passing parameters by value and passing parameters by reference with an example?

507


What is integer c#?

494


What is byte c#?

451


What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?

515


What is iformatprovider in c#?

499


what is the syntax to inherit from a class in c#?

546


What do you know about Translate Accelerator?

595