Compile time polymorphism vs. run time polymorphism

后端 未结 9 2207
栀梦
栀梦 2020-12-23 00:15

Why is overloading called compile time polymorphism and Overriding run time polymorphism in C#?

9条回答
  •  醉梦人生
    2020-12-23 00:35

    Classical examples of static polimorphism are based on template metaprogramming or Duck Typing but not on method overloading.

    Static polimorphism means that desicion is made by compilier (statically), and dynamic polimorphism means that desition is made only in runtime (dynamically).

提交回复
热议问题