1

Possible Duplicate:
Double dispatch in C#?

Can somebody explain what is the Double Dispatch pattern in detail with a simple example in C#?

I know there are already some questions about this topic on SO, but I dont understand the sense of the reflection example. I am sure there are other scenarios where double dispatch can more easily explained.

Community
  • 1
  • 1
Rookian
  • 19,841
  • 28
  • 110
  • 180
  • @Rookian - That's an automatic comment, added when someone votes to close as a duplicate. – Oded Apr 08 '12 at 18:22
  • @Oded - Actually, he referenced that question in his, as he apparently didn't understand the examples there. Had I noticed that it was the very same question he cited I might have chosen a different potential duplicate or not voted to close at all. – Don Roby Apr 08 '12 at 18:24
  • @Rookian - Look for examples of implementing the Visitor Pattern in C#. This is a principal usage of double dispatch emulation in languages like C# and Java without true multiple dispatch. – Don Roby Apr 08 '12 at 18:27
  • @Rookian maybe you'd want to elaborate, add a specific problem you want solved and then to explain on that very case, might help you. – NSGaga-mostly-inactive Apr 08 '12 at 18:32
  • 1
    http://stackoverflow.com/questions/9892660/how-to-improve-this-method-using-polymorphismoverloading-so-as-to-reduce-is-ty/9894768#9894768 – Sandeep Apr 08 '12 at 19:07

0 Answers0