0% found this document useful (0 votes)
57 views

Using Class Static Void: System Firstpor (Main (Console - Writeline ("Hello, World ") ) )

Uploaded by

fofo1975
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Using Class Static Void: System Firstpor (Main (Console - Writeline ("Hello, World ") ) )

Uploaded by

fofo1975
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

:

.
#$ %&'( ) *

+,

: %&'(

$-$

"

/$ 0& 1 # 2

using System;
class FirstPor
{
static void Main ()
{
Console.WriteLine ("Hello, World ");
}
}

456 57 85" 9 ;

5 ; 456

; C 8" 46/ ?@" EF B


B5

, C 5 K G5

<+ 0=>

@" ) *

; 46

, C O N&

)IG W@ C Y Z&* , &[

4I/ a & Z8! b

&5>e Z8J* d8J # $

'

" ] FirstPor " 8"

{ Z8J* d8J

, C 4 G H 4IC J ,

S , /*, N+P$G Q *, OC R> D C

%^85_`H 45I/Y ] 45+/\ 4L=


" -$M

B-

, Object Oriented Programming D+ 8$ 4+ C

5L M& , C 4 !& N &

TU V M& W X, D+ 8$ 4+ C

2 , %&'( ?@" A 2&'

- 4+/> B

,]

8Y$ 8Y

C Y 0 1 a! 4 8-$ class
> *c , 4+/> 4I/Y Class

. 4+/\

/ A 8$g 8" S +

f}

?? Q i &PG % C , T+j Q8J$!


45Io + n +/ V = #$ M A

45 +* 45+/> 5 4/+!

4R

Rk/ , 4/ 8j 4R &PG @l m Q8 !

4+/> W p k$G )$n , q&> p G rm s&'$ aG B

:t $

d2 G &PG T$Y

YI+, B Y

, 4 +* p G

I! T$Y

+/ TU

System.Console.WriteLine ("Hello World ");

45C T5$Y Z8! M u 8R$, , #*+-j BY( V M= N BI* Z8! , Q i &PG Z@v
5 8/ 4*+y5

, % 5C ,

V 5M= B5*~ #$

System 4I/

using 4/I

&Y w-R Z8!

8 |> }L=H z*

`M +/

, BY( @" x &P!


+G

R$> , ;

y l , using 4/I W@ E y' a!

%28 8
.4&'

k$GM Z8! #$

TU

D-$Y V M& B

)IG , p8J

N+P$G #$ Q *,i OC R\ * x W8v "

X, Z&* S , [ &PG rm BJ$ /, u

\ q nm q8v

#" , % n 4+/> x

*c method 4/+!8 Q *,i ?@"

. BC !

TU , w+` BY(

L M& BI* #Y

. V M= @+' 4
45 , 0|$, A 6$ x W8v 9 M

1X, }!8 } 6$ q8v

} 8Rg 4/+!8 &* , 1X * S+, B+R'$

4PJM 8Y

TU 4/+! B

nzM Z8! % -* ?@" a '


: t $ BY(

class
{

Z&*

`I! 1m "& @M Z8! q&> A9S*$!

B i x W8

5+` , Main 4/+! x V M&

\ N+c

1m K/J 9

},8J* }!8

CalssName
firstMethod (
{

}
SecondMethod(
{

}
}
9m +/

J, , u

Hello, " 45/c &

K/J , static

, EF N & 9 4/+!8

# * 7X, void 4I/Y

... * S+, nzM Z8! @Y" -$Y

Q8<GH 8" DM +n , d2 G &PG 8" 9 V M= T/ rm /

5* a5 Console 4+/\

WriteLine 4/+!8 % 2 I I M 8" ? /*, W@ B , " World

)5$n " " d 5-$ 9 45 * " 5 v N , 4 ( x "& o Z8! #$ % -*


. &> <+ + 4+RM 4/c NyM
5'M

k$G5 , b |5Y 0 5 &


.

&P!

5M 8

-$Y %& B

, %&

I5!

&[

CP X I

&M M a |H Z&*

X p8J V M& T$Y

&

YI Q 4*+-P , 4/+!8

.... 4I H ?@"
#5

rm 5 8H 85P$
Q 8_+' 4kG

N 8 +n , B (H *
B5-

, %5[ E 5P> t & o Y

M , V M= @" -$
n 8 Z& t /

8Y b : 9 , E P>i ?@" 9S$n 0 "

@5 ,8! &Y 4

a/*

8Y

4 ?@"

E 5P>i 5*

-Y

*-5 p 5$ 9

5+/ TU M +n ]

55, , ++

# $ 0&o$M bm 0&v +" +"

^p

E P>i

5 5

a! &*
%^85_`H AS/Y

/$ Main

; 4j8J H 4/ '
4+/\ a! 8Y 9

%&'
:

@5 , First Pro B[ &, x a!9 W8 9


@ 5 x5 W8v 9

, 7amm B[ p

, system
8P!

% n 8 l -$G

&' 4 $

5 5 $ 4+! G5 ?@5" , Z &5 45 4! G5n


. @Y" main

+, * #$ 8 $!

4+ >

E rm *

A@'M b

Q8 ! , ASY/ *

+/ T_+, , 4+L& E P>

b [ QS$n9 ,

* u

4+C

%&' 4 $ E E + i
46 ]1

/$ System
&P! B #
. 4/+!8

TU ]2
4+/\

\ ES! 4+IG$ z * 0 " ]3


, @Y" for class B[
ES!i

- 9

, w+` a! =$*
.a!9 4

9m

: 4+ $ %&'( T$

//
using System;
class SecondPor
{
static void Main ()
{
/* What is the differences between this methods ? */
Console.Write ("Welcome to ");
Console.WriteLine ("C# Programming");
}
}

:t $

A &kH q|! 4c& l BI

Welcome to C# Programming

q&5> 4+ & AS/ x W8 W@


B

&n , 06

V 5M=

4-G

w8 8" S

5J+/* T5$Y

>i 8/ T$ W@ p Y T"1

V M= a , x

G , A J+/* 2&L 7m

/I 4J &j , }L=H q % +{ A 2 *

, &PG5 #5 $ )$n E (

Q8 ! , ?? 4 +/_Mm
# ,, $ $ x

' a$ 9

:B ( W

t$

&

?@" * T$Y +` 5 m K G
. * * }

}5 5Y

G'M Q8J$!

#" 9 , 2 R @"

K G V M= T$Y

?@" } 8Rg

Tn 4PJM 0 "

YI +n " " O+R $ #$

using System;class SecondPor{static void Main (){/* What


is the differences between this methods ? */Console.Write
("Welcome to ");Console.WriteLine ("C# Programming");}}

Q8`$ Z8!

+n i V M& W

@" B*' 9 M , D+, b2& 9


.

Z&*

) , n E
P 9

t Y
, a+`{ rm

N 8 , Write WriteLine } &' 8" s88 T rm N &M u

"& o Z8! #$ 4/I{ # $ +n 4 $Y

6y5M 4/I{ # $

8R

Ny Write

&g S W ,

&P! 4

. Enter + m 4/I{ 4 -P WriteLine


rm A 56$H 5* B> 5

8" &' , 4 8 ! BY

D*y$, WriteLine
8Y+, ,

&P! - Enter

p k$G5H 5 T5/P V M& BI*M S +n G' &' 0


: 4+ $ %&'( T$

Z8!

. L M&
u

// Third Program
using System;
class ThirdPor
{
static void Main ()
{
Console.WriteLine ("Welcome\nto\nC#\nProgramming");
}
}

: 4+ $ A &kH x BRv Z8!


Welcome
to
C#
Programming

, QE G$

#-/ K+I

) # , QE G$ 9

]Enter DM S BI* Q *,i ?@"


Escape

, @Y" A &kH A& 1 H QE G$

Q8<GH 8" \n 8" & @"

&l B! ! )IG #$

. 4J+J -

^8 & ?@"

#L=
+/ E

* 0 "

Q { , A &kH K+G $ p k$G #" p8I* x , 1

G` ($Y

, + &*(

0 ^

&l # G 9 , Sequence
: ^8 & ?@"

&l 4/G/!

Q8 ! ,

w8 t $

8
t $ &PG 4

\n

H N8 +` ,

\t

tab 4+J,i 4

\r

t &PG 4

&P!

{ 4, G 4/I
rm

H %2 m

backslash \ d8Y*H K( 4 -P p k$G

\\

d -$ 9 4

\"

4 -P p k$G

?? $ & q& , 4+ $ %&'( T$Y


// Forth Program
using System;
using System.Windows.Forms;
class ForthPro
{
static void Main ()
{
MessageBox.Show("Welcome\nto\nC#\nPorgramming");
}
}

rm N & +y
$

YI

+/ TU DMX, 8 $! Q8_+' BI*$G Z8!


* &

%28 8

G+ 7i , L M&

1m , B_*$G 9 BI B

System.Windows.Forms 4-$Y

N & 4, Solution Explorer Q8/ &*$G


S Add References |>

References / w$'

I+ &JM a N &H /L rm D

S System.Windows.Forms.dll |>

, Q8/ w'R$ rm T"1 D+ m


:4+ $ % 8R

.NET T 8-$ |> , %@, M

& o Z8! a

: 4+ $ % 8R

. OK a Select a

: 4+ $ 4_+$ q|! V M= a &

4/+5!8

k$5! a MessageBox 4+/\ % 2 8" D I


. 4 !& 4+/> A 6$

6$I

+` 4 & B Y 4 !& N & 8 4+'+


+5 5Y

85 i

" 4 !&

!! ^
,

1 *

4 !& N & 7m

$ 9 K G 28Y

-$ #$ 4 !& 4 Iy$ 4 !& N &

Show

aY`$

YI$ Z8!

A M8J i BY

m B * T &J
^i 2

aY`$

YI$

. u

?? S &* a S *IU p k$GH

@> p8J V M& T$YM

: x B 8$ /, 1m ?? *$G

M B"

using System;
class Addition
//
{
static void Main ()
{
! "
string FirstNumber, //
! "
SecondNumber;//
! "
int
x,
//#$%& ! "'
! "
y,
//#$%& ! "'
sum;
//
()
*+ , -.
/01
//
Console.Write ("Please Enter the First Number: ");
FirstNumber = Console.ReadLine();
()
*+ , -.
/01
//
Console.Write ("Please Enter the Second Number: ");
SecondNumber = Console.ReadLine ();
9:
//4%$%& ! . 23 4$5 6 *787 *,9%
x =Int32.Parse (FirstNumber);
y = Int32.Parse (SecondNumber);
4$0 "
9:
// ;<
sum = x + y;
4$0
=
> "
//
Console.WriteLine ("The Sum = {0}",sum);
}
}

. 1X p2 J d

%&'( ?@" z p8 Z8!


:d

. p k$GH

@l T 8

S -/P , 2 * &j 4+/I* p8J V M& 4 $Y a ]1

: 4+ $ Q Y i

BY BY a! 4+/I* p8J V M& T$ ]2

Write p k$! Q 4*+-P , * p8_

*************
***

. J p k$!

I!

YI

... WriteLine

You might also like