Compile time polymorphism vs. run time polymorphism

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

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

9条回答
  •  北荒
    北荒 (楼主)
    2020-12-23 00:31

    Because it's known at compile time which of your overloaded functions is called, but that is not always the case for an overridden function.

提交回复
热议问题