You are on page 1of 20

‫اللجنة العلمية ‪ -‬إتحاد طلب هندسة المنيا‬

‫بالتعاون مع أسرة ريبرث‬

‫‪C#.NET‬‬
Why should we
learn a
programming
Today , we know that almost all of the
language
processes that we do or need in?
our daily life
is managed by computer , computer is not
that intelligent machine that can collect
INPUTS , guess the process that you want it to
do to get the OUTPUT . No , it can not do this ,
it needs your orders in each step starting in
the moment that the program is run to the
moment it is closed in .
That is Why you need a programming
language .
Why should we
learn a
programming
language ?
Programming language (C# for ex.) translates
the process which we want the machine to do
into CODES that the machine can
understand . Actually , the computer don’t
under stand such a simple process like (1+2)
in the way you see it , it needs this process to
be converted into a number system (Binary)
consists of only (0 & 1) , the language does
this step to enable the machine to run the
process in the way you planed to .
Why should we
learn a
programming
language ?
As an Engineer , you are supposed to deal
with applications and operations that you will
need the computer to run . For ex. , the air
conditioning systems , power distribution
control , data processes and a huge amount
of operations are run and controlled by
computer programs that made by a
PROGRAMMING LANGUAGE .
THE PROGRAM
NEEDS INPUT ,
A SPECIFIED
PROCESSES , TO
GIVE THE
INPUT
INTEGER,CHAR,
FLOAT , SHORT …

FLOW CONTROL DIRECT


COMMANDS PROCES OPERATIONS
IF, FOR, WHILE, DO S +.-./,×,÷,%
WHILE , SWITCH

OUTPU
T
Types of DATA
My first program :
Hello Egypt !
Open your visual studio >> File >> new >>
project
Choose your settings as shown ,then press OK
:
Namespace : a collection of classes each has a specific
functions and methods that you need in the program , this
make the coding much more simpler as you don’t have to
define this functions every time you need to use them .
Ex. : System.Text (not system.text !) contains classes that
represent ASCII and Unicode character encodings….. Etc.

Namespaces used in the


program.

The MAIN
Write your code function
here !
Main() : The Method or the BIG function where you put the code
lines you want the program to run . All the code which makes
the process must be written in it in order to tell the COMBILER
that this is the code of the operation

Namespaces used in the


program.

The MAIN
Write your code function
here !
Write the program shown , then from the <Debug> menu
choose <Start Debug> , or press <F5>, see what you get !
If you has a Very fast eye , you’ll see this for a second ,
If you have a very fast computer m you will not what ever you
did !
Change the program to be as following :
The result will be as the following , this will remain until you
press the <ENTER> key
Now , let us make a very little change in the code and run it :
When we run the program , we had a different result , just a
black screen !!
What does that mean ?!!!
So, lets press <ENTER> and see what will happen !
The result CHANGED ..?

Yes !!
PROCESSES
:
1- Process order
The operations are written in
the form of CODE LINES , this
code lines are taken in series
while the program is run .
The first code run first and so
on .
End of the first lecture
Hope it is helpful
Thanks for you time
Eng. Ahmed Sakr
Ahmedsakr01@gmail.com

You might also like