Quantcast
Channel: Advantages of using delegates? - Stack Overflow
Viewing all articles
Browse latest Browse all 15

Advantages of using delegates?

$
0
0

I'm looking to implement the Observer pattern in VB.NET or C# or some other first-class .NET language. I've heard that delegates can be used for this, but can't figure out why they would be preferred over plain old interfaces implemented on observers. So,

  • Why should I use delegates instead of defining my own interfaces and passing around references to objects implementing them?
  • Why might I want to avoid using delegates, and go with good ol'-fashioned interfaces?

Viewing all articles
Browse latest Browse all 15

Latest Images

Trending Articles





Latest Images