The exclusive abstract we’ll do with the cipher is to indite whatever aggregation to the screen. But here’s the cipher that Visual C# prepares for you when you prototypal create a Console Application:

For now, cut the 3 lines that advise with using (we’ll intend to them after in the book). But they add references to in-built code. The namespace distinction includes the study of your application. A namespace is a artefact to assemble attendant cipher together. Again, don’t vexation most the constituent namespace, as you’ll wager most these later.
The abstract that’s essential above is the word class. All your cipher module be cursive in classes. This digit is titled Program (you crapper call them anything you like, as daylong as C# hasn’t condemned the word for itself). But conceive of a collection as a portion of cipher that you provide a study to.
Inside of the collection titled Program there is this code:
static vacuum Main(string[] args)
{
}
This example of cipher is something titled a Method. The study of the Method above is Main. When you separate your programme, C# looks for a Method titled Main. It uses the Main Method as the play saucer for your programmes. It then executes whatever cipher between those digit frizzy brackets. The chromatic book above are every primary book – keywords. You’ll wager more most them in after chapters.
But function your indicator after the prototypal frizzy bracket, and then impact the move key on your keyboard:

The indicator automatically indents for you, primed to identify something. Note where the frizzy brackets are, though, in the cipher above. You hit a unify for collection Program, and a unify for the Main method. Miss digit discover and you’ll intend nonachievement messages.
The azygos distinction of cipher we’ll indite is this (but don’t indite it yet):
Console.WriteLine(“Hello C Sharp!”);
First, identify the honor “C”. You’ll wager a popup menu. This popup schedule is titled the IntelliSense menu. It tries to surmisal what you want, and allows you to apace add the component from the list. But it should countenance same this, after you hit written a top honor “C”:
C# 2010

Older versions of C#

The picture to the mitt of the word Console on the itemize above effectuation that it is a Class. But advise the Enter key on your keyboard. The word module be additional to your code:

Now identify a flooded kibosh (period) directly after the word Console. The IntelliSense schedule appears again:

You crapper ingest the mark keys on your keyboard to advise up or downbound the list. But if you identify Write and then the honor L of Line, IntelliSense module automatically advise downbound and superior it for you:


Press the Enter key to add the word WriteLine to your code:

Now identify a mitt ammo bracket. As presently as you identify the ammo bracket, you’ll wager this:

WriteLine is additional Method (A Method is meet whatever cipher that does a portion job). But the chromatic incase is informing you that there are 19 assorted versions of this Method. You could utter the diminutive arrows to advise up and downbound the list. Instead, identify the following:
“Hello C Sharp!”
Don’t block the threefold quotes at the advise and end. These verify C# that you poverty text. Your cipher module countenance same this:

Now identify a correct ammo bracket:

Notice the flushed wiggly distinction at the end. This is the writing environment’s artefact of informing you that you’ve uncomprehensible something out.
The abstract we’ve uncomprehensible discover is a semicolon. All rank lines of cipher in C# staleness modify with a semicolon. Miss digit discover and you’ll intend nonachievement messages. Type the semicolon at the modify and the flushed wiggly distinction module go away. Your cipher should today countenance same this:

Note every the assorted colours. Visual C# colour-codes the assorted parts of your code. The carmine colouration between threefold quotes effectuation that you poverty text; the naif colouration effectuation it’s a Class; chromatic book are ones that C# force for itself.






















