Amit  Raghav
What is diference between Abstract method and static method? Can we define the static method in abstract class?
By Amit Raghav in ASP.NET on May 16 2008
  • Niradhip Chakraborty
    May, 2008 16

    Static methods can be defined in an abstract class. However, you cannot force a derived class to implement a static method. If you think about it, such a method would be useless. Static methods are invoked using type names, not instance variables. If I call MyBaseClass.MyMethod, then MyBaseClass.MyMethod will always be invoked. How would it do you any good to force MyChildClass, which inherits from MyBaseClass, to also a implement a static MyMethod.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS