Apt-W1 2
Apt-W1 2
Apt-W1 2
Yasser N. Mohammed
Introduction Of Programming Language
• Programmers are the people who create these instructions, which control
computers, these instructions are called programs.
2
• C# is a modern, general-purpose, object-oriented programming language
developed by Microsoft and approved by European Computer
Manufacturers Association (ECMA) and International Standards
Organization (ISO).
3
The Advantages of C #
• It is a modern, general-purpose programming language.
• It is object oriented.
• It is component oriented.
• It is easy to learn.
• It is a structured language.
• Windows applications.
• Web applications.
• Web services.
5
A C# program consists of the following parts:
• Namespace declaration.
• A class.
• Class methods.
• Class attributes.
•
• A Main method.
• Comments.
6
Simple code that prints the words "Hello World":
7
The various parts of the given program:
• The first line of the program using System; - the using keyword is used to
include the System namespace in the program.
• a class contains the data and method definitions that your program uses,
the class has only one method Main.
• the Main method, which is the entry point for all C# programs. The Main
method states what the class does when executed.
8
It is important to note the following points:
9
Compiling and Executing the Program
• Start Visual Studio.
• Specify a name for your project and click OK button. This creates a new
project in Solution Explorer.
• Click the Run button or press F5 key to execute the project. A Command
Prompt window appears that contains the results.
10