Question d’entretien chez Getty Images

What is a static method?

Réponse à la question d'entretien

Utilisateur anonyme

11 mai 2012

A method that doesn't require an instance of the class. A static method cannot use instance fields within the class (i.e. using the "this" keyword). I gave an example of String.IsNullOrEmpty as a static method that doesn't require you to create a string instance before calling it. They didn't seem to like that answer.