The First Sample Program, Line by Line
Although
Example.cs
is quite short, it includes several key features that are common to all
C# programs. Let’s closely examine each part of the program, beginning with its name.
The name of a C# program is arbitrary. Unlike some computer languages (most notably,
Java) in which the name of a program file is very important, this is not the case for C#. You
were told to call the sample program
Example.cs
so that the instructions for compiling and
running the program would apply, but as far as C# is concerned, you could have called the
file by another name. For example, the preceding sample program could have been called
Do'stlaringiz bilan baham: |