Static keyword in C#:-

static is a modifier in C# which is applicable for the following:

  1. Classes
  2. Variables
  3. Methods
  4. Constructor
  5. It is also applicable to properties, event, and operators. To create a static member(class, variable, methods, constructor), precede its declaration with the keyword static. When a member is declared static, it can be accessed with the name of its class directly.

results matching ""

    No results matching ""