O'Reilly logo

Special Edition Using C# by NIIT

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Class Declaration

A class is a reference type that contains data members, such as indexers, properties, methods, and events. You must declare a class before it can be instantiated. Class declaration follows the following syntax:

						attributes modifier class class_identifier: class_base 
{
    class body 
}

Class Attributes

An attribute represents declarative information that can be attached to the different elements of code, such as classes, methods, data members, or properties. This declarative information can then be queried at runtime.

→ For an introductory explanation of attributes, seeAttributes,” p. 75

→ For a detailed explanation of attribute usage, seeAttributes,” p. 267

Class Modifiers

A modifier is a language feature that is used to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required