Static Members

Generic types can have static members. Static members cannot be bound to an open constructed type. Static members belong to the type where the member is defined. However, for a generic type, the type where the member is defined is an open constructed type, and static members of a generic type belong to the closed constructed type. There can be more than one closed constructed type for a generic type, each one having its own set of static members from the same generic type. Static members are accessible using the closed constructed type notation. Static constructors, which are called implicitly, initialize the static fields in the context of the current closed constructed type.

This is the constructed type notation for accessing a ...

Get Programming Microsoft® Visual C#® 2008: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.