Sign Up
RelaxBuddy helps you connect and share with the people in your life.

when why to use delegates

This query already has a solution right here:

  • Where do I use delegates? [closed] 8 answers

I'm somewhat new in c#, & I'm considering <sturdy>when to use Delegates correctly.they're widely utilized in events declaration , but if should I use them in my very own code and why are they helpful?, why to not use something else?

I'm additionally thinking about <robust>after I must use delegates and I don't have some other selection.

Thx for the lend a hand.

EDIT: I assume I've discovered a <robust>essential use of Delegates right here

#c #net #delegates
Last update on March 20, 3:12 am by NICHOLAS8190.

A delegate is a straightforward class that may be used to indicate to methods with a particular signature, turning into essentially a sort-secure serve as pointer. A delegate's purpose is to facilitate a decision back to any other method (or methods), after one has been completed, in a structured way.

While it may be imaginable to create an intensive set of code to accomplish this capability, you don�t want too. You can use a delegate.

Creating a delegate is simple to do. Identify the category as a delegate with the "delegate" key phrase. Then specify the signature of the sort.

Last update on March 20, 3:12 am by HILARIO7097.
All times are GMT. The time now is 9:17 am.