Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need More Info On Delegates
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Need More Info On Delegates
Divers
Thread ID:
01385016
Message ID:
01385016
Vues:
103
I'm looking at this example: http://geekswithblogs.net/joycsharp/archive/2008/02/15/simple-c-delegate-sample.aspx

It's clear and short, and I get the syntax, but the question is why.

Since class A is creating an instance of class B, why would I not just write a switch statement that calls either the Add or the Sub method?

I guess I'm still searching for a real-world use for delegates.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform