Is C# a single dispatch or multiple dispatch language?

后端 未结 8 2017
悲&欢浪女
悲&欢浪女 2020-12-02 20:25

I\'m trying to understand what single and multiple dispatch are, exactly.

I just read this:
http://en.wikipedia.org/wiki/Multiple_dispatch

And from that

8条回答
  •  生来不讨喜
    2020-12-02 20:55

    C# does not support multiple dispatch. The Visitor Design pattern emulates something that could be described as multiple dispatch, even though the Visitor pattern's mainly focus on separate the algorithm from an hierarchy.

提交回复
热议问题