Teste

Disponível somente no TrabalhosFeitos
  • Páginas : 15 (3613 palavras )
  • Download(s) : 0
  • Publicado : 13 de junho de 2012
Ler documento completo
Amostra do texto
' ( ) ( )) ) 0 )" 0 7

) ' ( ( " "# " 1

" "

! "# $%& * +") # " "" " -) # , " .) / ) " " 23 . ) " 5 6) ) 4 " : ! 4 " 8 0 ) $%& )$ 5

))

+ " " ) "

) #. ) " $4 " )) )

4 ) )

"# # ; ) ) "

$%& 8 $%& 9 )) )) " 8 ) " 8 .) / )

) ") )) )

)



! 8 # " ) " ) " " )

" "

*

")

# ;

' (< ( ") ) > ") "

$%& ) ) )

" ) ") =) ") ") " ") ) # " " ") 4 " ) ?1 8 " )"" , ") ) ) 7 ) )

7 " ) 7 )9 9 >8 >8# ) =) )) " )) • % # ) • !B 4 #6 " )" ) & +" "0 ) )" #

# ) "- ) " )

) #

@ " ) "0 )")

( " ) ( " ) )" )) ) 8) 0 ) 0 ) ) 1 ") ) "

) +") " "" ) +") "A

) #6 " 0 D) " D

)

)) ) " ) 7 # )7

C) ) 4

#

)

" 84 " %4 ))C ) %4 " ) 7 ) ) &, -) #" 7 )) , ) ) ) " )

" " " B ) "" ) " 0 ) )" . ) . ) ) )" )) " ) #6 "



! ) "

) ) ( ()"

" ( )) " ( " "D " #" 0 ) 4 " B

))

" " " 1 C) ) D ! ! "D ) " )) ) ! "# B

?1 8 =E! $%& " " ) " " % "# )" 4 " %4 LL) "$ $ & '( " )

") =1 >88 7 7 "" +") 4)" ") $%& )) " 0

# $! ) ))0 ' ') )" 9"

" F 7 ) G H ) '

4 ) "

"

9 9

7

)

)" )"

M

5

<

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

> " ! "

B4

) N )"

"

"4 # " " " " 4

%4 " <

+

!

*

,

* ! !

) ) )) ) ) " ") )" ) = # " " C) P

E

C) ) "D ) )) )

B " ) = )

E "

O ) )

# )) ) = ) ) ) "

) "

)

" " 4 )) 7 ) 0 4 " ) )) " # "

) " )) " "

$ " ) ) #

4)" # )"" 0 ) 0 "

= • • • • •

" " "

) D " < "< ") " ) ! " ") " ) ! "

Q#

)<

, ,

)" )"

" "

D < " <

, ! = )7 )! " 4<

* ! ! ) " ) )) ) ") ) )

//Estrutura do programa em C# using System; namespace MathNamespace{ public class MathClass{ /* Main Exibe no prompt */ public static void Main(string[] args){ Math m = new Math(); Console.WriteLine(m.Sum(1,1)); } //Classe Math public class Math:Object{ public int Sum(int a, int b){ return (a+b); } } } }

E • • •

)" " $ ) )R & ) - )) ) 1 )S ) • = ")-) )" " ) " # ) )" ") ) " )" " )R " ) )" C ) C) ) ) )R 4

)

7

)

"<

)

")

$ )" " # )" ) P )! " F 7 " # "

"

$%&

)" " & 6 A ) ) 4 "

)

/ ' , # " ) G 8H ' P ' , '6 ' ) ) ' 3II 233

) # "

" ) " N ) " ) 0 ) )" " ! )" " ! 4 <

class Casts{ public static void Main(){ int x; long y=10; //Cast consistente x=(int)y; System.Console.WriteLine("Cast consistente int x={0}long y={1}",x,y); //Cast inconsistente y=2147483648; x=(int)y; System.Console.WriteLine("Cast inconsistente int x={0} long y={1}",x,y); } }

! "

4 E

" I )"

" 4

%4

"

+

! :

*

,

*

E"

U +

0

)

" 0

)C ) O

) 4 ; ")

1

:

!6

9

!

, *8

*!

1 $

$

, ! % )

!% ! & $ )" "

%

& 7 " )) )) " " ) * " ) ) ) ) )" " ) "D )

"")" " ) ) ) " ) " *

)" " ) "" () E )) )" ") 4 ) 4 1 ) ) )" " ) " ) : # : ) ") ) ) )" ")

) ) )( ) " " )

using System; //Classe public class MyClassRect{ //Campos public uint x, y; //Calculo da área do retângulo public ulong Area(){ return x*y; } } //Estrutura public struct MyStructRect{ //Campos public uint x, y; //Calculo da área do retângulo public ulong Area(){ return x*y; } } classMainClass{ public static void Main(){ MyClassRect cl = new MyClassRect(); //alocado na heap MyStructRect st; //alocado na stack cl.x = 10; cl.y = 5;

st.x = 10; st.y = 5; Console.WriteLine("Classe - {0} m X {1} m = {2} m²" ,cl.x,cl.y,cl.Area()); Console.WriteLine("Estrutura - {0} m X {1} m = {2} m²",st.x,st.y,st.Area()); } }

! " 5

4 E U )"

"

"

5 4

%4

"

+

! ;

*

,

*< ! $

=

> ) 4 4 () "O )C ) 4 ; ") ) 4 ) " ) )) () ) " * +") +") " ) " 4 "

># " " 6 " "D )" ) 74 "0 4
//Boxing int x = 12345; object o = x; //Unboxing x = (int)o;

)

)

) )" 0 ) ' ) + 4 -) " "

=) " )

0 " " ) )) 0 ) # 4 ) ) 0 * ) 0 ) " +" 0 ' +" . ; D 6 A E# Q 4 )" 4 " 7 )# )< 4 4 "

) " ) 6 A >F

) )" " 4 V B

0

'

) "

)

8 $% & "D

) $%& ))

* 4 ))...
tracking img