C# Polymorphism

后端 未结 4 1971
难免孤独
难免孤独 2020-12-25 10:19


What\'s the difference between run-time polymorphism and compile-time polymorphism? Also, what\'s the difference between early binding and late binding? Examples woul

4条回答
  •  我在风中等你
    2020-12-25 10:34

    early binding and static binding is same.late binding and dynamic binding is same.dynamic binding means compiler will choose which method to call on runtime.static binding means compiler will choose method to call on compile time.when we use is-a relationship of inheritance and assign derive class reference to base class reference .we will allow to invoke or access only base class reference.roslyn service will provide keyword virtual,abstract and override to call derive class member by base class reference.

提交回复
热议问题