Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need More Info On Delegates
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Need More Info On Delegates
Miscellaneous
Thread ID:
01385016
Message ID:
01385016
Views:
104
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
Next
Reply
Map
View

Click here to load this message in the networking platform