static -- C# Keyword

static  -- C# Keyword


  • Use the static modifier to declare a static member, which belongs to the type itself rather than to a specific object.
  •  The static modifier can be used with classes, fields, methods, properties, operators, events, and constructors, but it cannot be used with indexers, destructors, or types other than classes.
static class <Class Name>
    {
        public static void <Method Name>() { /*...*/ }
        public static void <Method Name>() { /*...*/  }
    }