Identifiers and Keywords

Identifiers are names of various program elements in the code that uniquely identify an element. They are the names of things like variables or fields. They're specified by the programmer and should have names that indicate their purpose.

Keywords are reserved words in the C# language. Since they're reserved, they can't be used as identifiers. Examples of keywords are class, public, or void—they are the names of permanent language elements.

Identifiers

Identifiers are names used to identify code elements. The class name HowdyPartner on line 7 of Listing 2.1 is an example of an identifier. Identifiers should be meaningful for their intended purpose. For example, the HowdyPartner program prints the words “Howdy, Partner!” ...

Get C# Unleashed 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.