Static vs Instance Methods

Publié le: 10 mai 2021
sur la chaîne: 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  


Sur cette page du site, vous pouvez voir la vidéo en ligne Static vs Instance Methods durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur travadi education 10 mai 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 18 fois et il a aimé 2 téléspectateurs. Bon visionnage!