2012 | OriginalPaper | Buchkapitel
Types, Storage, and Variables
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
If you were to broadly characterize the source code of C and C++ programs, you might say that a C program is a set of functions and datatypes and that a C++ program is a set of functions and classes. A C# program, however, is a set of type declarations.
The source code of a C# program or DLL is a set of one or more type declarations.
For an executable, one of the types declared must be a class that includes a method called Main.
A
namespace
is a way of grouping a related set of type declarations and giving the group a name. Since your program is a related set of type declarations, you will generally declare your program type inside a namespace you create.