Instance method Vs Static method in c sharp

Instance method Vs Static method 


  • If a method is explicitly declared by using static modifier we call that method as a static method or else by default every method is an instance method.
  • While defining method in a class if the method are instance and if we want to consume and static member of the class under the method we can directly consumed but if the method are static and if we want to consume any instance member we can consume only through the class instance because instance member of class can be consume from static block only with the help of class instance.







No comments:

Post a Comment