Static vs Instance Methods

Published: 10 May 2021
on channel: travadi education
18
2

Static vs Instance Methods

static method
A static method in C# is a method that keeps only one copy of the method at the Type level, not the object level. That means, all instances of the class share the same copy of the method and its data. The last updated value of the method is shared among all objects of that Type.

instance method
Invoking an instance method requires that you instantiate an object and call the method on that object; an instance method operates on that instance and its data. You invoke a static method by referencing the name of the type to which the method belongs; static methods do not operate on instance data.

Instagram
  / taha_travadi  

FaceBook
  / taha.travadi.10  

Linkedin
  / taha-travadi-21001b129  


On this page of the site you can watch the video online Static vs Instance Methods with a duration of hours minute second in good quality, which was uploaded by the user travadi education 10 May 2021, share the link with friends and acquaintances, this video has already been watched 18 times on youtube and it was liked by 2 viewers. Enjoy your viewing!