h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

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>() { /*...*/  }
    }