Csharp. Second Topic. First Program.

Csharp. Second Topic. First Program.

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

More

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (6)

Section 1

(6 cards)

More

Front

we have to compile it and run it by pressing Ctrl + F5, or clicking Run button or by clicking the "Debug" menu and clicking "Start Without Debugging".

Back

Things about the structure of the code learned:

Front

- The Main() is a method of Program class which is the entry point of the console application. - String is a data type. - 'message' is a variable, that holds a value of a specified data type. - "Hello World!!" is the value of the message variable. - Console is a .NET framework class. WriteLine() is a method which you can use to display messages to the console.

Back

Things about the structure of the code learned:

Front

- Every .NET application takes the reference of the necessary .NET framework namespaces that it is planning to use with the "using" keyword e.g. using System.Text

Back

Things about the structure of the code learned:

Front

- We then declared a class using the "class" keyword: class Program.

Back

Note:

Front

Every line or statement in C# must end with a semicolon (;).

Back

Things about the structure of the code learned:

Front

- Declare the namespace for the current class using the "namespace" keyword e.g. namespace CSharpTutorials.FirstProgram

Back