Documentos de Académico
Documentos de Profesional
Documentos de Cultura
VISUAL C# Csharp - Intsight
VISUAL C# Csharp - Intsight
OUROBUROS
ESTADO ACTUAL DEL LIBRO
CONVENIOS
VII
VII
VII
VIII
QU ES LA PLATAFORMA .NET?
POR QU .NET Y NO JAVA?
COMMON LANGUAGE RUNTIME
ENSAMBLADOS Y MDULOS
CLASES Y ESPACIOS DE NOMBRES
PROCESOS Y DOMINIOS DE APLICACIN
EL SISTEMA DE TIPOS COMUNES
TIPOS BSICOS
VECTORES
1
2
3
4
5
7
8
8
10
12
12
13
14
15
15
17
19
20
22
22
22
22
23
25
25
25
27
28
29
31
34
34
35
37
38
39
43
43
43
LIMITACIONES: CONSTRUCTORES
LIMITACIONES: HERENCIA Y VISIBILIDAD
MTODOS VIRTUALES Y ESTRUCTURAS
INTERFACES Y ESTRUCTURAS
EL SAGRADO MISTERIO DEL BOXING
VI. TIPOS DELEGADOS
DELEGADOS
CADENAS DE DELEGADOS
LLAMADAS ASNCRONAS
VII. COMPONENTES
COMPONENTES VERSUS CLASES
PROPIEDADES
INDEXADORES
PROPIEDADES CON IMPLEMENTACIN AUTOMTICA
EVENTOS
CLASES PARCIALES
MTODOS PARCIALES
VIII. ADMINISTRACION DE MEMORIA
RECOGIENDO LA BASURA
FINALIZACIN Y DESTRUCCIN DETERMINISTA
PRECAUCIONES EN UN MUNDO FELIZ
IX. GENERICIDAD
TIPOS GENRICOS
CLIENTES Y PROVEEDORES DE TIPOS GENRICOS
GENERICIDAD Y RESTRICCIONES
MTODOS GENRICOS
CMO FUNCIONA LA INFERENCIA DE TIPOS
NUDISMO Y COVARIANZA
GENERICIDAD Y TIPOS ANIDADOS
TIPOS ANULABLES
OPERACIONES CON TIPOS ANULABLES
PROMOCIN DE OPERADORES
X. ITERACION
EL PATRN DE ENUMERACIN
ITERADORES
COMPOSICIN DE ITERADORES
MTODOS ANNIMOS
EXPRESIONES LAMBDA
EQUIVALENCIA ESTRUCTURAL?
RBOLES DE EXPRESIONES
XI. REFLEXION
SISTEMAS HIPOCONDRACOS
INFORMACIN SOBRE TIPOS
REFLEXIN Y ENSAMBLADOS
MANEJO DINMICO DE INSTANCIAS
ATRIBUTOS
DISEO DE ATRIBUTOS
REFLEXIN SOBRE ATRIBUTOS
46
47
48
49
50
53
53
56
57
60
60
61
62
64
65
66
69
71
71
72
74
76
76
77
78
80
80
81
83
85
87
89
91
91
93
95
96
98
100
100
102
102
103
104
106
108
110
112
INDICE ALFABETICO
115
!" # $
&$
&
!
%"
"
%"
. %
/
$
. " &
!
" + "0 $ 1
)
)
$
$
!
. '
"
"
)
# ) +
$
" %
#
#
" '
& (
( # )!
-+
$
!
(
"
( -
(
&
.
+ # 5#
"
" "2 " 72 ! $
3 ( 4+
&
3
6(
%
'
"
"
2
#
&
)
" $
)%
(
"
"
# (
"
-(
.
)
.
"
!
. " &
'
2
. %
"$
#
" )
"
+
"+ 2
&
"! !
*+ ,
. '
A )!
.
"
& 9:;<
"
" $
) (
"
"
+
'
&
) "
2
8
&
"
< "
" +
B$ C
" 4
"
2 Estructuras
& ) clases parciales 9 ) )
!
"
"
2 Reflexin
")2 Iteracin
8 3$*
"
8
")
"
'$
) " +8
)
/
Clases y objetos
Tipos de interfaz$
! "+
Programacin orientada a objetos (
2
<#
8
"
"
$
<=>>?@
2 ..
2
2
.0
$
.0 (
!
2
"
#
$
+ )%
"
" #
!
$ #
.
. (
@$
B =$>$
&
&
+
)
#2
)
"
"/
'$
& "
"
"(
& "
2%
"& "
. %
& .
&$
+
" 4
"
$
$
(
"
" #
.
'
.
"
$
/
(
(
3
.
/
)
)
. +. 4 +
(
# + .
"
$*
" %
.)
( 3
."
(
. 2+
"
"
&
(
&
& . "
'
D 2
." E
2"
)
) $
'
"
&
&
"! !
+)
"
$
# "
8 3 ( #+
/
# # #
)$
.
"
&
")
"
)
%
-
'
")
'
"
)
&
8 $
F
'
"
0 " #
"
.
"
7
&
"
$
#
$
.0
"
8$
'
.
$
"
!
$
(
$ &
(
+(
# $
*
"""#
$
"""# $$
")
# $
#
=>>?
1 G
$
)3)
. !
H
H
H
+)
+ "
(
" $
.
" "
E H 8 "&
" + # EH %
# )2
D*
)
EH
&
.
"
E H 8 &"
) (
DA" E H
+&
' .
4E
# )
"
"
"
HD
H D(
&
"
$
.
%. (
& I$>
*$ C
) $
"
*J
. % +
$ KF - $
" %$
"
"
#
"
"!(
" "
.
/
#+
*J
$
"
)
)
%
"
(
. % (
"
)
*J$ KF -
" ,
"
"
(
" $
"
$
"
#
"
"
&
"
A+
"
.0
(
"
# &
"
3
(
"
)
&
)%
#
"
+(
)
"
#
% A
2(
& =$>
"
*J + (
)
)
servicios corporativos (
"
0 "
"!
( 3
" $
'&
"
+
. "
"
"
(
)
. "
) ( .
'
HD
%"
2
"
"2/
(
&
'
"
. (
(
"
&+
'
. % #+
(
&
"
(
L$ *
$
"
" +)
.
)$
A+
"
) " $
% &$
"
M
&
%
" '
"
"
N #
$
$
$
% &$
" "
+
" (
#
"
(
+
"
8.
.
)
'
%"
&
2
"
+
.
.
)
& .
"
.
(
"
%
& .
%
&$A +
.
(
. -
&/
+
0 "
$
) (
" #
"
"
(
% & +
+ " "
&
'
" "
&
& =$>
" $
))
"
'
+
&"
#
( (
"
"! "
"
8.
" $* #
) "
.
(
#+
(
.
"
&
&
!
*J
+*
$
M
"
&
/ # +" #
!
. .
$
"
"
."
"
+#
" "
2 # )!
& .
O
"
" "
"
N (
"
$
)
"
"
'
"
+#
#+
&
' /
"
" "
"
) $
O
+$
$A+
)
4K ( "
"
% $
.
. %
) O
"
" +
. (
$
!
#
#
+" +)
3
$
%
"!
"!(
&/
"
"
"
)
O7*
!"
"
&
% &
+" +
NP
. !"
O
!)
$
)
$
(
"
) 3
$
"
)&
*
&
+
"
"
&
. "
applets
&
"
"
!
.
"
"
#+
. %"
0
%
8
&
$
&
"
(
%
. " "
& (
"
% &$
& $ K1
O7*
O
) $
. $
. O
.
"
% & (
"
& .
$O
)
" +
$
bytecode
"
"
1
) +
)
" #
nunca
"
%/
bytecode +
"
.
+
(
& !
" " /
(
& .
$
& .
"
+ +
"
(
3
. "
"
+
& )
$
"
+ "
# )2 (
.
4%
)
) "
applets +O
#
"! 2
)2
") .
#
%
.!
&
&
$$
&
.!
/ K( #
.
'
M
N .+
.
$
:$:
.
# )
& "!
)$
"!
2"
" M
N Q "
.
4
%"!
Q "
"! (
.
(
(
%
M
" %
bugs
'
"
/
$
&
"
&
(
" 5 )"
%
!
"!
O
$
. "
"
"
+
"
$ DataSet
-
)
"
) $
.
"
+ "
servicios corporativos$
!
(
$
O
(
M
"
&
" O= 4 +
"! (
M
.
"
"
O
0 "
.) (
&
"
&/
"
.
(
"
data binding
&6+
2
"
" +) %
"0
8 3
"
(
0"
M
N
"
(
N
"
(
"
% ) "
"
N =>>>
*J$
8
%
) O
&
"
"
(
" )
) &
"
"
$
(
4
) +"
)$ * "
(
(
!
+
#
" #
-(
(
-
"!
) "
)%
( - "
"
"
" (
+ +
"
( -#
"
) +"
.
)
$
"
"
&
"
"+
# "
$
+
(
.
&
$1
' ( #
"
" .
2
+ ).
(
! "
" #
C #
. /
"
"2 "
" '
" $ C )" +
#
(
"
$
& .
"
" 4 )
& .
"
$
"
"
.
&
(
+
+
"
& % )
))
$
A
") . (
)
$ '
&
(
K )
"
"
"
%"!
+ !
just in time
"
&
.
$ KF A+
8 "
# )!
" "
$
)
)
'"
4
"
(
2 .
(
"
#
& .
#+
.
/
) ' $
)2
!
&
"
"
& .
& .
)%
.0
+
(
$
"-
"
Main
"
"
"
+
'
"
(
#
.
.
'
&
( 3
."
,
" '
% &
)
.
. " $
%
""-
"
* +
)
(
+
$ '
" "
"
" "
9
"!
" )!
!
!" (
"
"
"
'$
( 2(
& .
)
"
) /
+
"
&$
&
&
&
!
"
" "
&
(
"
2 . "
2
"
%"
$
& # +(
%"
&$
N
) %
2
"
@+
" "
) ( #+(
& .
$
!$ D
$
&
!"
" #
ngen
"
)
&
# )!
(
"
&
(
$
#
"
& .
MeDaLoMismo
"
'
.
%
& (
$K !
& .
+
.
)'
& .
"!
(
" .
/
.
"
"
"
) #
(
& 8
"
)$
ngen$
" + "
" $
& =$>
.0 " "
&
%
MeDaLoMismo
"-
"
!
+
& .
/
"
& .
"!
ngen )
) %
"
2 (
" #
$
#+
"
"
(
+
'(
%
"
&8" % &
#
Q +
& .
"
"
"
ngen$ A +
% &
%"
%
&$
" "'
. &$
!
")
.
inlining
8
"
(
&
O
"
& R
%
"
"
(
" %/
. % Q + :$
"
.
)%
&$
$
%
+
"
& .
"
%
&
& .
$
(
"
(
%.
"
(
&$
2 $
&
" %
' &
"
"
2
"
" "
"
' " %
$
) (
%
'
)% (
"
(
& .
& +
)
"!
$
$
+
Complex
(
))
#
"
enlace esttico
& .
"
"
5
6$ " "
" %"
/ ." (
" %
0"
" %$
. %
" JJ
. "
"
)
))
$
M
N
2
#
8
& lib$
&
)
. " (
& .
" " se copia
$
(
"
) "
" '
3 +
N
$$
"
))
!"
))
&
"
. 2
))
%
0"
"
" " "
Complex
3
!
#
(
(
") .
#
&
")-
!"
"
"!8"
"!
"
!" $
!
"
"
(
")
%
))
$ KF
Complex$
(
2"
&
%$
" $
)
"
!
"
% (
)
N
+
!"
.
))
.
& .
&
)%
"! (
"!
&
"
"
+
"
.
$
) " "
/
Todo avance en Informtica consiste en aadir otra capa de indireccin.
&
#
2
" (
$
'
#
"
" " ))
"!
"&
."
"&
")") $
(
"
3
"
")
.
"&
"
'
"
2 "
"
++
$
. %
"
!"
"&
"
# )2 (
"&
"
$
2
!"
"
%)
"
") .
$
/ "
"
")
")-
*+,-
+.
"
"
)
"
(
#
&
7
&
"
")
"
+ %
&
$
$
")
!
)%
"&
"&
# +(
.
" &.
&
"
"&
&
)
")& " + "
")
+
7
"
))
"
"!
)%
" mdulos +
#
2
" ensamblado/
!
%
8
. "
")&
")
KF "
")
"
/
$ A + ")+
+"
"
"
!
")
"
") (
$
+
")
.
"!
")
" /
System.String
System.Data.SqlClient.SqlDataAdapter
Microsoft.CSharp.CSharpCodeProvider
IntSight.Proteus.Stargate.Entity
#
)
")
. (
"+ 2
.
"
")
&.
)
%"
. % (
"
.0
"
")
"
"
" ,
'
. %
0 "
espacios de nombres
namespaces$
) .
")
"
")
"
"
")
System.Data.SqlClient.SqlDataAdapter
")
")
")
SqlDataAdapter$
)
SqlClient
"
"
) "
") $
(
. .
System
Data (
")
")
")
" "
) "
")
$
!
8
/
"
" "
) ( -
"
System$
"
52 6(
5
'
")
"
(
")
"
$
")
"
'
"
+ "
") $
.
+
")
$
K &"
"
#
& .
) ( -
")
ildasm
"
"
&
&
"
'. ! $ *
%
8
+
Reflector
.
!. /
"
") .
'1
www.aisto.com/roeder/dotnet
" "
" .
)
& =$>
&/
2
"
!)
"&
#
"
" .
system.dll$
Reflector
& "!
"
")
"&
System$
"
;$=$;T$> +
$ ( 2
"
)%
")
#
(
&
$$
&
") $
%"
"
Microsoft.CSharp (
. +
CSharpCodeProvider (
0)
$
"
$
"
%
#
"
&
"! #
M
N
"
"
9threads@
$
#
0
+$ )
( #
(
"
"
$
M
N
)
)
# + !
"
" &
#
" "
$
' &
# " "
' &
"
$
" "
"!
"
)
dominio de aplicacin
"
) M
(
&
$ %
. "
#
. "
") .
%
+))
+ %
$
" "
% $
# +( #
4
)
"
)
& .
(
$
"
" "
"
#-
"
.
$
verificacin
& . (
& "
.
)
$
2
M )
!.
"
"
+
5
# )"
"
%$
"
")
" + 2
+
!$
.
$
/
$
& .
.
") .
4
.
.
!"
"
&$
(
(
' (
"
6
&
"
"
# "
'&
"
$K "
$
% &
"
(
$
'
&$K #
+ "
" "
"!$
'
"
" "
"
"
&
#- "0 $
"
"
'
'
& +
(
"
. "
&
#
'
$ %
"0 /
&
"
"!
#
"
%"
$ %
N/
/
" "
" (
)
"
N "
M
+
&
!
$
#
'(
" 2
.
"
))
. "&
+
.
& . (
"
&$
$
.
!
"
%"
.
"
&
"
" " (
&$
&
"
$
)
( 2
" +!
"
"
"
&
" #
"
"
+
"&
$
.
& .
"
)
" # $
.
& .
"
.
& . "
.
.
& .
"
' .0
$
$
" "
"
"
" +
#
(
2 !
.
+
&
. "
&
.
"!
&
" "
*+,-
$
&
(
" "
. %
+
"
)%
/
$
" " "
)%
"
.
@(
2 )
. " "
")
"
"
(
)
"
&
"!
+ 8
0 "
. %
/
'
)!
O
&"
'
"
"
4+
")-
(
.
. "
"
&
"
( -
! $
"
%
"
"
" $
"
%"
"!8"
$1
(
999.ToString()
&
)
B
2
"
) 8
5)!
6+ !
(
$ " "
"
.
/
. %
"
$$
2
String
8
/
"
&
&
"
& To-
999.ToString("C")
K ! .
(
4
( "
' "! 2
(
2 )
)%
+
)
8
"
(
.
"
3 "
(
)!
8
#+
6/ )
"! "
"
"
"
.
:? )
I= ) $ A +
tipos de valor
"
"
.
"
+
)
)!
)
"
")
)
)
'
'
0
'
)'
A+
" $
2"
"
(
"
/
+
'
!
!
!
!
!
!
!
!
+
+
#
.
&$
)%
%"
"
)!
"!
"
0
.
5
5
12
12
67
67
28
28
,
/
0
12
3
4
8
5
"
2
)
"
Common Language Runtime +
&
/
)!
#+ .
(
compuestos (
.
"
&
"!(
I= ) $
(
B$
.
. "
'$
%&
System.Boolean
System.Char
System.SByte
System.Byte
System.Int16
System.UInt16
System.Int32
System.UInt32
System.Int64
System.UInt64
System.Single
System.Double
) '
)%
8
"!
"
( 2
"!
. %
+ )% $
.
5)!
"!(
&
(
&
%
& .
")
. %
//
System.Int32 i = 0;
//
K " .
)
//
for (System.Int32 i = 0; i < 10; i++)
{
}
//
*
7
. %
.
#
G
)$
"
.
(
.
"! "2 "
$
4 "
"
$
(
B
"
"
(
,
!
"
(
+
2
.
. " &$
.
" & .
"
(
#
. "
"
")
+( 7
"
&
2
$
.
. "
B
(
7
+
"
)
2
+
G
A "
)!
5)! 6
3
$ '
3
"
" # "! "
"+ 2
/
0
9
'
+
"
3$
175
(
"
)
8
&$
A+
$C " "
. =4
" (
B/
")
%&
System.Object
System.String
System.Decimal
)1
K #+
"))
(
& =$>
)
. "
boxing +unboxing
. #
"+
boxing$
"
%&
System.DateTime
System.Guid
System.DBNull
/
:
'
.
$
" (
)"
0
0
2
")
"
+&
);9)
"
"
"
DBNull/
DBNull$
)"
(
&
. % "
'
2
(
'
"!
"
"
" 3 + " %
&
)
&$
2 ./
"
" "
vectores 9arrays@
%"
!
"!4 +#
/
8
+
&
(
B
T[]$
2(
" .
"
&
*+,-
'"
&
! '< 1=
>
>
")
. $
$ *! )
8
). $ "
"
"
< JJ
/
$
2
# )
&
T'
7=
'<
! :
"
$
. %$
. "
?
*
"
"
"
2
)2
&
:>
"
"
8 3
.
2 )
2
") $
) /
)$
"
&
$$
< JJ
'(
$ #
"
"
+
"!
!
B 9 8
&
. "
'(
) +
"!$
#
.
&
O
(
&
JJ
=$>@/
'
8
)
.
"
"+
%" /
+
)
#
$
)%
+
&"
$
8
'
&
"-
"
Length
)
"
"
"
+"
&
"
&
"
"
" ")
Array
"
") .
")
""
(
"
)
(
"-
!
/
(
$* #
Resize
"
"%"
)
!"
"
+(
!"
"-
"
")
Resize
(
)$
::
1 R1 *
$
" .
) ( - .
( #
)
.0 "
"
( -
)%
2 .0
. "
&
)% 6$
.2
$
+ " # )
!
$
"
5
"
&
. " &
(
"
2
) " (
$ $ $(
#
%
(
") .
)) (
*+,-
.
" " %
"
)
$
# +(
2
1
!(
%
"
opcional )
* 0
3
*
!
@
*
$
&
) " "
& . + 8
$ K &"
"
8)
(
0 "
."
)"
)" $
. " +(
"
"
( 3
$ ")- . !
(
1
-
"2
)
)%
8
) (
)
(
2 ( '!
" +
2" % $
+ 8 $C
(
) 4
").2
*
)
?
*
B
C
. %
)%
. % "
2
"
(
&
!
)
8
+ 8)
$
( 2+ ! +
. %
&
!
++
.
. " &$
$
"
&
%
. " &
')
"&
"
"
4
. "
$
"
%
"
ray tracer$
)"
8
.
"
"
'
$
"
+
"
'
. "
& .
$C
"!$
ray tracer$
')
))
& .
. " &
))
(
8
)
2
)%
. %
(
2
. "
"
)%
"
"
.
."
$
(
)%
3
" +
(
&
%
&
% & $ K1
"
(
( #
)
2 " "
'
"
.
A
*
$
"
'
)%
(
"
8
+" #
"
.
.
) (
2
"
"
%"
( +
"!
)
$
+)1
/ " .
."
(
.
"
" quicksort
"
"
.
"
$
"
'(
"
"
"+
"
"
4
" "
) 2" )
$K
E
#
( (
D
comparar
"
"
/
"
.
"
"
!"
+4
.
. "
(
"!
D
(
$ K ( -#
"
"
" (
"
"
!"
&
"
. " &
#+ .
(
$
"
K( - (
"
(
.
$
"
)"
* "
"
. "
) +!
. %
"
")
" +
)
. "
"
F '!
K
" #
esto no vale$ A +" #
& . +
8 #
" "
"
" !
(
esto es una porquera usted es un genio, amigo$
& .
+
(
2 $ K" .
(
2 (
"
& # +(
"
)
( -
")-
2
+
. "
' "
(
"
"
"
"+
. " (
.
$
)'
"
&
. "!
"
"
. " &
"
" +
abstracciones
&
" + "
"
%"
5.
&/
)
"
6
)
I$> +
"
)% $ "
2
# )2
& (
)
0
#
"
variables/
)
$
& .
8 $
$
*
"
'$
3
(
2
"
"
) (
) . )
/
var
DesplHorizontal, DesplVertical: Integer;
CursorX, CursorY: Integer;
NombreFichero: String;
GuardarCopia: Boolean;
*
(
(
. "
"
(
"
!#
')
:I
)%
(
.2
2
+
) $
"
)
"
4 + " + )) (
.
"
)
$ # +*
) +
"
MxN
$C
0
# # )
$ "
'( # + ( #
")
" # ) !(
.
!
) +
2
$
)
( . (
+
)
2 ( #
" '
.
+
!
' descomposicin modular$
(
8
"
"!
(
)$
"
.
"
%/
"
"
#
"
-) E@$ 1
! "
"
#
. '
9D "
8
" $C
%"
. )
"
records
type
" #
&$
/
"
&
. "
&
"
)
&
3
"!
/ )
"
"
"
)$
(
(
0"
&
"
+# )
#
"
"&
. %(
& .
"
structs
$
( 3
%
# +"
"
2
.
+ $
Posicion = record
X, Y: Integer;
end;
var
Desplazamiento: Posicion;
Cursor: Posicion;
&
"! .
"
"
)
2$ .
"
! .
"
.2 %"
# +"
+
"
"
&
"
(
# )- "
"&
"
'
:;
'
)
$
"!
$
"
" "
8
$
"0 + )
$ #2 !
"
*
+
(
8 "
" "2 "
2
.
"
#
# )2
)'
+!
+(
8 "
G%
?>
"
)
" .
&
"
.
"
G
#
3
"
(
2
)
"
8
(
"
)
& "
"!
0)
( +
.
#
+)1
&
)'
#
(
. % decentes
'
" $
8 2 "
"
#
"
$K ( (
+
"
"! I$
(
(
.
. % (
-
2
%"
# "
"
&
-
$
*
)"
'$
!
*
#
)
)
"!
)
! "
& "
"
#+
/ &
"
0
$
(
"
) "/
. )
"
%
) $
# )
0"
)
"
(
. ) $
) "
%.
"+ 2
)
')
9packages@
+ ) "! (
$
2
tipos de datos abstractos ADTs$
(
2
)
"
#
" "
&
$ K !
2 .
.
) (
)
+ . "
(
)
.
$
.
)
"
&
'
D
.
.2
(
E
# )2
"
(
.
. "
+"
'
"
"
. $
(
(
" +
" )
# )2
")
2
"
(
$
"
*+,-
")
% (
")- # )2
"
)
%
" "
"
"
"
(
2(
)
(
"
)
/
.2
"
"
"
"!
&$
)
2
) (
. "
"
"
( (
"
2
&
"
)
*
&
Editor 9
?
* *
)
. % 8
.
"
GO
+ . +
"! $
" *
#)
# #
"
" # "!
2
"!
"
)
:S
genericidad #
".
JJ4
.
&
. "
fichero de texto
5
2"
dispositivo
%.
$ A +# ) 2"
(
. " "
.
8
& #
$
$
#
3 ?V +
+ "
&"
" $C " "
)
(
8
L
"
)
%"
".
"
$
2
"
)
#
'
" "
. $
" /
&
" -
)%
#
"
(
")" "2 "
(
streams
(
"
record
"
(
)
%"
)%
"
# )2 (
)
.3 /
6
# )
"
)
)%
"! )
3 ?V # )
. %$ 2
"
"
&
( 2
"
. % " $
"
# )
.
"
. %
. " &
3
8
%+
"
3
"
'
+
.
") . $
Zona de datos
Cdigo ejecutable
.
/
( - " 3
( #
(
2
"
(
8
&
"
)
"
" Assign
$ )
(
"
#
" " $ *!
&
)% $
"
#+
. "
(
"
:?
quicksort
2 " "
. "
! )
+
( " "
- $
'
. "
" Open Read +Close4$
(
)2 %
. $ K1
)"
2 $
"!
#
) 5
")- comportamiento$
.
(
. " &
"
)2
#
"
+ ")
"
#
)
/
)
'
.
"
( 3
"
&
) datos
2
"
$
( 3
$
& # )2
"
"
)"
&"
" "
" "
)%
(
&
2
"
+(
AssignPrn
"
6/
.
2
"
"
!
&
(
"
"
!
" +
&$
,
&
( +
+)1
( 3
. "
'
2 .
type
. +
+
" $
+ &
%
/
."
" "
. "
$
(
. "-
(
(
)
'
.6
)% 2
" .
(
+
"
# .
+
")'
+ "
'
%(
# (
.
!
"
"
) % +# " '
+
)- "
"
"
$ 2
$
# )
'
(
"
# )2
+
" # "
&.
&
(
)$
(
"
)
!) " # )
"
"
S$S
2"
$K
(
)
type
&
comportamiento
&
Vector = object
public
X, Y, Z: Double;
end;
constructor Create;
function Length: Double;
procedure Add(const V: Vector);
" "
"
"
%
'
%
& )
!"
)
Vector$
!"
" 2 $
")- #
")
" Length
$
'
")
$
(
") "
.)
constructor$
"
") #
"
. $
7"
&"
" #
&
(
" . A %) .
"!
# @$
#
9
#
)
')
" "
. "
& .
))
. 2
"
"
%$ .
" $
#
" "
)
+
.
"
5
%"
' &6
" Vector
(
$
2"
#
!")
#
!"
.
)
/ VectorLength
"
$
"
"
)
.
# )
(
& (
&"
Vector/
! :U
var
V1, V2: Vector;
Len: Double;
begin
V1.Create;
V1.X := 1;
Len := V1.Length;
V2.Create;
V2.Y := 1;
V1.Add(V2);
// etctera
end;
A "
#
"
")
$
// En vez de InitializeVector(V1)
// En vez de VectorLength(V1)
"
!"
&"
!"
" 2 /
)
")
mtodo$ )
(
!"
" 2
Create
2"
2
"
" " $
") "! .
&
. /
") .
!"
")
" 2
+
(
)
"
SumVectors$
+
"
'
# )2 .
"2
(
"!
"
$
/
(
&$
"
)"
"
"
2" "
"
3 $
8
(
"
(
"
'
"
/
+
)
"
"
'
"
"
"
"
" "!
(
4
"
#+
! + "
&
& .$ )
componer 8
"! " % $
" "
"
'
"
%"
&
2 "!
"
2"
"
"
/
SumVectors(v_temp1, v1, v2);
SumVectors(v_temp2, v_temp1, v3);
454&
+ 3&+364/,+
,
#
-,
#
-,
!
) "
+
+
.
."
" +
"
. "
&
&
$
)
)
%
")
' &
"
!" +
#
"
") $
"
# )
&$
%" %
."
&
)%
"
.
:T
%"
") $
"+ 2
"! )
"
2 " +
#
D "
+'
"
.
-
E +
" #
) 24 7 # "
(
"!
(
. "
)
$
"
.
"
+ 8
( "!
).
")
ray tracer
( +
$K 2
" % (
+)1
)
/
2 "
(
)
. "
(
&$
# #
&
!
. "
"
"
')
4
#
"
. "
" "
)
$ KF -
) $
&
$
"&
(
&
'
.
K*
" %
$
$
%
" "
(
# )
" .
) ( )
"
2"
"
"! !
9 (
)
&
.
"
#
"
" %
"
" .
"
D 2 +
"
&
"
"
5 (
#
"
"
%
. "
"
) #
& " /
"
E KC ( -
"!
7
"
"
(
)% $
" '
% . % @$ ")") $
" # "
&
B
+ .
(
4
!
"
&
) "
"
. " &
&
(
. %
)
8
9event driven
B
*
%
&
" %
"
$
"
"
)%
)
# )2
" 6$
"
#
2
# .!"
"
'
/52 "
) 6$
.
&
)%
herencia$
.
.
'
(
" "
.
(
M .
) "
9
(
.
) .
.
# )2
"
&
&
. !
.
$
$
'
filsofos$
%
"
# )
.
(
)
# #
&
(
%
2
&.
# #
+
$
'(
felis
.carnvoro "
.-
" +"
'"
"
'&
' 8
. " &
(
"
+
"!
$
"
(
'& +
#
" +
"
"!
(
X+
-
"
-
) .
(
" #
"
!
(
% ( 2
che, qu
"
"! (
$
( -
/
"
"
)%
. "
$
felidae
)
"
&
) .
%
"!
"
+ 8.
G . (
.
(
# N
"
).
+% ( 2 /
felis catus
puto mundo!
-"
"
)
"
.2
&
&
@ #
&
%"
"
") .
"
"
"
)
3
.
$
G)
) 4 +(
. :V
. "
#
# "
(
%"
"
.
"
&
)%
"
'
.
"+
&
" "
#
3
" "!
E
") .
"
"
$K
" ) 0)
(
+(
"
Punto3D
"
$
) @
"
(
B/
) 2
#
K ) 2
"
&
"! .
3
"
"
(
8
.0
( A+8
'
$ DC
. "
.
$
"2 "
"
"
"
"
" $
2
/
" "
(
"
(
(
Punto2D
" '
$
&. $
92
")
.
I
%.
(
2(
.
. "
%(
&
)%
) (
#
)
#
" polimorfismo$
real
(
$
. (
"
/
public class A
{
// campos definidos por A y heredados por B
public A() { } // Un constructor sencillo para A.
}
public class B : A
{
// campos introducidos por B
public B() { } // Un constructor sencillo para B.
}
"!
"
"
) "
"
"
8
!"
A
'
"-
"
!
public class C
{
public static void Metodo(A parametro)
{
//
}
}
"
=>
%"
# "B$
/
( +
+)1
C.Metodo(new A());
C.Metodo(new B());
"
"-
. " "
'&
"
A +B
Metodo
B
+"
"
! ")-
" "
"
"
"
"
" "
"
&
$
)
.
") . (
"
&$ " .
C/
"-
public class C
{
public static void OtroMetodo(B parametro)
{
//
}
}
.
3
"
"
" "
. 2
/
C.OtroMetodo(new B());
C.OtroMetodo(new A());
// Error de compilacin!
B +
)
B$
"
.
- "
) (
A K( -
&
"
A "
#
'
"
"-
(
)
%"
"
(
$
"-
A/
public class A
{
// campos definidos por A y heredados por B
public A() { } // Un constructor sencillo para A.
public void Metodo()
{
// Manipulamos el campo amarillo.
}
}
public class B : A
{
// campos introducidos por B
public B() { } // Un constructor sencillo para B.
}
)"
)%
(
"-
Metodo
"
(
aplicar
%.
. "
&
A/
A a = new A();
a.Metodo();
=:
&
#
+ ")-
"
B
tiene (
. (
"$
) #
) /
B b = new B();
b.Metodo();
C
& .
(
B
"
$ & (
. "
Metodo
"
& .
$
"
"
"! !
A & "
" "
"
8
( % "
$
"
" "
"
#
5 . 6/
.
Metodo
/
K1
&
#
VMT
"
2"
.
)
==
"0
Cdigo ejecutable
)%
"-
" "
$
"
) "
! 1
( +
"
)
+)1
"
#
"
"
(
$
& "
"
!
&
"
)
. "
(
0
)
" "!
. !
2
'
)
%+
# 2#
")- 4
!
(
&"
)%
# !
)
(
) %$ G
" %
& (
&
!
. "
!
(
2
2
"
"
"
"
( 3
3 $
"
"
0
#%
#
. "
)
&
. "
!
"
& (
"
)"
.
+ +
$
+ +
-
" "
+
'
") .
" # " $
)2
! . " +
'" +
"
"
"
!
" %
) " $
)%
" # "+ (
3 $ 8
# &
(
)+
.
' $
"
"
# &
&. /
"
#
%
$ KC
)
. " #
( 3
(
( 2
"
)
.
"
4
!
2
")
8
)
)
/
. "
) 5" %
6
!
"!
'
.
. '"!
.
" %
. "
+
" " $
"
"
"
+
!"
+
)%
"! %
. !
"
&
.
(
"
+
'
'
' 3 +
.
A "
!
.
&
&"
"
. "
"
!
(
' !
"
""
* % $
!
!
(
.)
!
)
" % . $
! ")(
! "
"
'
&
!
(
. " !"
. &"
&
(
#%
- +
! 5" %
6$
=I
" %
"!
+
/
.
- "
" %
"
=;
5" %
5# "
'
"
$ "
8 !
6$
" ! 5
6$ 7 !
( 3
+
8 &
5# "
6$ C
4
"
)
)) "
.
) 4
2"
3
' 2 $
!. $
# )!
$
(
6
.
"
" %
. !
-
!
(
Q1
. "
clases
A+
.
. %
)"
/
" O
"!
"
&
(
$
"
)
,
# )
#+
(
(
clase$
%"
2
semntica de asignacin por referencia$
" $
"
. (
"
"
K
&
2" "
" "
+
$
&
*+,-
)%
/
$
( 3
)% +
# +(
"
)
"
" "
"
&
3
$7
" #
)
" "
"
"
. &"
)% $
&
"
$
tipos de referencia
Common Language Runtime
$
!( #
$
'<
*
3
"
/
!
/
$
")
#)
)% $
/
& .
. %
mtodos
0
)
)%
")
"
" $
"
"
#
$
"
(
%
. . "
+ . '
" "
"
/
8
"&
!#
!(
"
(
" "
"4
2
")- "$
(
"
"
+
)%
)
$
" "
"$
"
" aplicar # "- ,
" 2
"'
"
"
"(
%
( # +(
$
"
"
!
(
)
& .
8
)
(
&
"
& .
)%
. %
9D
$
4 +)
)%
"
E@
construyen
(
$ # +
. (
8
" #
/ "
& +
"
" ")
& "
"
+
. "
"
"
"
"
"
"
'
3
"
"
2
"
"
"
$
"-
(
"
6
. $
4
"
"
")&
"
"
"
# )
& 6 9raising@
" "
) 5 " 6
# )
" campos de instancia$
"
")"
"$
$
"
$*
(
"
%"
// Un campo de instancia
public string nombre;
// Un campo "esttico"
public static string prefijo;
"
'
nombre
"
"
#
&
"
(
" 6 (
(
)"
mtodo esttico "
!
"- /
)
"- $
0"
"
#
(
- "
" "
"
#
"
prefijo
"
"
" prefijo
"-
0
"
)
"
8 2
"
" 2 $
"
"
$C "
8 2 "
" 2
"
(
5
"
" ")
&
&
"
$
") . &
# # D
"
+
"
")
" ")
! /
"
'
" .
" .
" 2
(
& (
"
.
2
1
=?
&
2
4 "!
" .
"
8 2
(
&
$
'
"
2"
" !
" ")
!
"
"
" +
'
. %
. "
"
$
2 "
)1
"
"
&
" ")
nivel de acceso/
(
)%
( -'
" 3
+
"+
$
"
"
) 2
+
#+
"
$
")
' -
"
"
"
$
)%
$
& .
"
1+
. %
"
(
# " ") $
'
"
) "
"
"+
"0
" #
!
$
$
"
"
&
"
JJ/
" ")
" "
$
'
")
+
+
")
"
#
" ")
&
'
" ")
(
'
(
(
( -
"
"!
")
$
A+
")
" ")
")
(
&
.
'
& "
)
# $
" "
(
" ")
" ")
" "
'
")
.
.
+
$Q
&
" ")
$
")
")
(
"
& #+
) /
&
")
DG
) E
" (
)
" ")
" ")
"
constructores de tipos
"
"
& 8 2
")-
'
0)
(
&
$ ) ) ")- (
.
"! "
"
$
. 2
"
constructores estticos
"'+ finalizadores 9 $U=@$
! =U
8
!"
#
. % .
"!
%
)
# +.
")
" "
.
"
).
)
)"
+
*+,-
. %
' &
.
"
&$ ( 2
,
)
. (
8"
"
&
8
")
")
"
"
)%
8
"
$
" "
"
"
0"
8.
.
!"
" 3
Common Language Runtime$
. %
"
#
(
"
)
&"
.
")
)
(
JJ O
'
-"
. %
"
"
" "
$
,
!
$
(
2"
%
JJ + O
"
"
&
"
-(
&
&
#
$
! '<
&
*
./
!"
. "
$
'
./
!
& .
"
"
"
#
"
$G
"
#
#
) $
"
(
-
#+
#
.
.$
./
"
"
"
8
sus
" '
8 2
" 2 $
!"
$
#
#
#
"
(
$
.(
" 2
# "
"
) %
" "
" (
#
.
/
$
!
public class A
{
public A(int i) { }
}
K7
(
"
.
!"
$
$ )
#+
)
'
)"
public class B : A
{
public B() { }
"
.
System.Object +
#
#
$
(
=T
) " /
8 (
"
(
"
)
&
)
'
)1
2
!"
"
") . (
(
2 2
#
B$
8
+
!"
)
"
"
#
'
" " (
%
# "
.
$ 8
#
"
"
5# "
"
"
# "
$
"
(
'
6
8
"
%
) / &
(
%"
&
" "
")
'
$
'
# #
&
. "
# +(
"
"
'
)
" "
"
!
&
%
3
" 2
8
&
8 2
' &
"
(
"
%
(
.
#
7 "
%"
$
"
.
"
"
'
"
"
"
"
(
" "
$ "
"! "
"
"
! .
' &
#
$
%
"
" $
"
# )!
.
)
# " $
(
" !
%$
public class A
{
public A()
{
Console.WriteLine("A");
}
}
public class B : A
{
private int i = 1234;
public B() : base()
{
Console.WriteLine("B");
}
}
" .
B$ K
"
+
&
"
( -
(
B 7-
%
%/
. =V
L_0006:
L_000b:
L_000c:
L_0011:
L_0016:
L_001b:
& .
"
.
.
"
) .
" O
Reflector$
"
"
"
"
B$
) (
"
" i
. "
(
"
" +
JJ
2 "
+
#
"
( 2
$5
A6$ G
JJ
) (
$ )
.
. "
(
A
O +
) '$
#$
"
public class A
{
public A()
{
Console.WriteLine("A: i = " + LecturaFutura());
}
protected virtual int LecturaFutura() { return 0; }
}
public class B : A
{
private int i = 1234;
public B() : base()
{
Console.WriteLine("B");
}
protected override int LecturaFutura() { return i; }
}
KF -
B K
"
"
"
Futura
# O
JJ
A
LecturaFutura
JJ
JJ
"
B
:=I;
(
8
8
&
" i # )2
"
"
I>
.
#
"
"
%
A$
JJ
"
+
+
"
"
"-
(
$
" "
"!
%
A
&
) $ LecturaFutura #
"
"
2
JJ "
/"
5& 6
'
"-
%
%
&
(
Lectura-
"
"
2
"
#
'
' & LecturaFutura
"! "
'
!:=I;$
"
")
"
)
$
"
)
!
& .
' !
$
"
)
"-
A$
& "!
. )
% ( 2
$
"
(
%
.
'
# O
.
7
+ B
' &
"
( '! "
"!
'
.
)
)1
&
+
"
#
"
' &
8
# "
" $
' &
"
"
(
& .
& +(
"
"
.
"
(
.
. !
!"
"
0
$
"
Reflector$
.
#
'
8 2 "
JJ$
%
(
"
# "
"
(
& . (
(
'
"
"
"
"
+ 3
&
"!
.0
8
)
"
/
public class A
{
public A()
{
Console.WriteLine("A");
}
}
public class B : A
{
private int i = Devuelve1234();
public B() : base()
{
Console.WriteLine("B");
}
private static int Devuelve1234()
{
Console.WriteLine("Inicializando campos");
return 1234;
}
}
%"
'
#2
)
"! $C
")
(
3
!"
B/
"
# "
'
!
!
B
+
"-
'
")%
"
%"
4
"
2
'
$ B
"(
"
&
"
Devuelve1234
2
$
&
'
%
+
" + )
(
(
2"
2
"!
!
!
(
"
$
!
"
"
! 6$
"
( (
(
2# ) "
(
"
! $K
/ (
#
"
!
(
"
"
!
"
!
)
#
"+" 2 $
I:
)
)
"
!
" " $
%
!
(
'
! 6
8 2 "
$
!"
+
" "!8"
!
!
!
"
,
"
(
&
"
" (
.
!
"
8 2 "
"
!
"!
$
"
'
")& .
'
/
public class Ejemplo
{
public static double Sqrt3 = Math.Sqrt(3.0);
public static double Sqrt2;
static Ejemplo()
{
Sqrt2 = Math.Sqrt(2.0);
}
}
( 2
") .
D
)
8
. %
!
' &
8
( #+
"
% . # +(
&
"
#
"
"
"
E
!
$
Reflector$
"
(
)
!
3 "
&
") /
A
'
"
" "
" $
$*
)
&$
"
(
beforefieldinit4 +
"
"
#+
'
" "
(
! explcito
(
" "
"
(
8
'
!
! " " )
(
.
beforefieldinit/ (
!
$
)
5 8 2 6
' !
.
)
' &$
'
#+
( -" "
/
I=
) %
"
!
8 2
) #
%
$
&
(
#
"
&
'
%
%"
"
!
" "
"
"
"
%" +
'
.
0
"
"
"
"
'(
"
$ K1
"
!
)1
"
"
+
)%
)
'(
'
%
$
II
* * Y
JJ
')
2 .
# ." 2
0 "
"
"
&
. "
!
& + (
(
JJ$
.
(
"!
cia de clases$
5#
" ")
" "
#
"
"0
6
+"
"
* #
%
"
"
)
"0
"
.
"
#
"
JJ
#
)
(
)%
"
. "
) $
"
&
!
(
. % (
) (
) #
( /
")
"
heren-
(
3
"
$
" #
. "
" 2
- ) "
(
2
"
.&
"
"
)
$
"
$
#
$
(
!
-
"
"!
&
. "
)
"
"
"
/
!.
#
&
&
"!
. "
(
"
(
")
"
'
"
Oscilador
"
" .
& .
(
$
"0
/
#
"
3 % ( 2
9 !
"
"
.
. "
"
&
' #
clases abstractas$
"
(
2"
"
" $
'
"
.
#
$
$
@
(
2"
*
/
%"
&
07
"
8 " +
)
$
,
+
2
&
"
$
+ ").Z
"0
+ .
""
# )
0
" + "
$ C" +"
&$
%"
.
2"
+
"
"
" #
"
"
"2 "
" )
)$
tipos de interfaz$
" ")
)
+
(
.
)
"-
"
(
"
&
"
. (
"
# )
"
)
+$
(
"
2
"!
)
$ KF -# +
. %
/
'
" O +
&
"
.
'/
'IOscilador
" $ #
. % $
/
'
" +
"
"
)
)
/
(
) heredar 8 "
&/
System.Object,
"
)
System.Object$
"
heredar
implementar
"-
$
A+
" "
"
$
%(
2
+ "+ 2
$
& +
(
'
" (
"!
"
&
'$
implementar
"
"
"
&
(
. (
'$
.2
$ Implementar .
). " "
4
"
"
'
& " 2
""-
"
+
"
'/
IS
}
// Otros miembros
}
"
#
Voltaje$
#
"
Chip
"
&
)
)
(
IOscilador +
"
(
# "
+.
.
M
N
"
"
1$
L*
0) $
(
8.
"
$
"
"
/
"
"
" #
"! )
Triangular "
' IConfigurable/
&
.0
)
"
"
"-
Voltaje
) $
"(
"
8. (
"
&
")
")
# "
"-
"
"
+
%
")
." ( # +
(
"
" "
&
"
"-
(
#
"
.
.
' "
"-
%
")
"(
"-
(
.
"
/
")
"-
Triangular$
"
&
"
&. $
"!
"
" "
8.
"
")
2
'
2
C$
&
"
"
"
'
"
$ &
"
"
"
"
'
"!
'(
"
"-
(
"-
"
8 2
$
"
8
'4
(
2"
'
'
" "
"
I?
")"
&
"$
8 2
") $
.
2
"
$
'/
8 2
)
(
"
"
3
"
& 8 2
(
"
(
"' "
I1 +I2 +(
")
" M$ . "
(
C "
M
C " "
" 2
"'$
(
(
" $
& 8 2
"I1.M I2.M
"
%$
&
07
Triangular
"
)
"
# #
"
"
#
.
"
" ) (
& . .
Voltaje )
"
' IOscilador$ *
&
(
1
'
&E
Triangular$
2
' "
.(
"
" %
. &$
&
"&
x = y;
"
"
F
F
/
y
' +(
' +(
"
4
"
implementar + derivar
"
8
&
%"
'IDisposable
Ventana (
.
C
" $
"
"
"
"
"
" /
)+
'IVentana (
& Claraboya$
IDisposable
)
" +
%"
'$
" " $
!
'&
& VentanaRedonda (
.
( " "
"
'
"
"
&"
"
"
(
"
!)
"
"
"!
# )%
.
'"
&
System.Object
'$
)
(
.
.
"
'
(
. "
"
")
"
"
# %
-$ "
+
.
$ 2
"
#
# /
% .3
. "
$
!
"0
$
" "
"
'$ " +
"
&
) $
"!
(
"!
$
"
. &
) 8
!)
"
(
"
"
! IU
$
mtodo de extensin 9extension method@
( "
# ""8
(
"!
" .
'$
+
)
&
8
&
2
) "!
(
#
)
(
4+
)"
"
& .
8
"
)" $
' " - /
!(
. "
"-
+
" +
+
""
"
"
(
"
+- "
" "
+
.
2
&
" " "
$
IStack
" " +
&
.
+
$
"
") .
0 $
%"
"
"-
2"
K( -
IStack
(
IStack
&
' ) .!
2"
"
"
# .
"
"-
"
"2
"-
"! "
)%
%.!
"&
"
"
8
"-
"
/
public static class StackExt
{
public static void PushList(IStack stack, params object[] list)
{
foreach (object item in list)
stack.Push(item);
}
public static void Clear(IStack stack)
{
while (!stack.IsEmpty)
stack.Pop();
}
}
" "
" /
"
+
")."
"
"-
(
8
"
&
!
"
" + %
"&
$
D
StackImpl (
(
"
"
).
!) " E
'IStack$
"
.
&
'
8
")
"
"
IT
"
"
StackExt (
")- "! . + .
" % $ KF -
+
- "
).
)
"
object paths
& .
07
I$>"
)
!
"
" ""
!"
" . $ A +(
")!
"
/
"
"(
)
)-
(
2"
(
)
" %"
(
.
"
& )
#
"
' "
'/
")- 8
.
.
IStack$
PushList +
(
(
&
!
8
&
"
"
. "
StackImpl$
StackImpl
"
")
)"
Clear
"&
(
(
/ "-
"3 $
"
)
&
%"
"
" "
" 3
"
"
( Estados
0 " /
"
"-
%( "
5 8
6
"
"& .
(
"-
'
"
)"
" "
K (
"
.
"
#+
. (
+#
" 8
K ( %
&
"
+
"
" )
+
. IV
.
"
(
(
# +(
8
"-
")
&
"
")
B
") N$
C +(
!
/
$(
# (
+ 8
# .
6$
.
""-
")
using N;
"
"
8
"-
( 2
Oops
"-
" "
%"
$
8
" "
&
") (
+
") $
"ToString
# /
"
"
)
"
" $
8
".
8
& ToString
(
! (
"8
&
(
" + "
5
"-
8
Oops$
'
""
Oops$
8
& Oops +
. "
.
3 $
"
Oops
& .
") #
8 "
" "
& .
"-
Oops$
"
) " .
."
$
(
&
" # "
"-
& # )
( - "
)
"
'+ % (
&$
"
&
(
"
"
*
"
%
(
"
" "
)
8
2
"
8
'/
2
& 6$
"-
"
"
)%
8
&
*
"
F$
"
$
'
"-
"
$ 8
.
System.String
2/ "
(
)%
")-
;>
String
)
"
4+
2$
"
.
"-
"
07
"
(
"-
. "
"
#2
) 8 2 "
" ""-
") .
8
&
"-
&$
"
"-
String/
"
) & .
"
1 "
. $ [
"-
&
) "
" +
5 8
6
*+,-
"
! 8
'$ *!
F$
#
'<
''
''
D
9
'' '
C
D
(
'
E
*
''
;:
El Conocimiento Secreto
"
!"
"
$
'
" #
&
" 3
)
% ( 2
"!
"
$
(
"
"
"
% ( 2
" %
$
' "
/ #+ .
5 )% 6 ) .
) ' 8 2 "
" ")
"
"
8 "
"
'
(
'
"-
&
(
'
$
G O 1
"
# +(
) %$ K1 ! .
"
1\
'
+
+
&
$ K*
"
)
"
)%
" #
'
4
*!
8
"
'
5
.
O
" "
%
!"
"
&
)%
.
" "
& 8. "
)
" "
4)
(
" "
&
" + 8.
" %
"!
"
#" %
)
2
#+
"
" +
&
"
$ R
" "
"
')
" '
" )
$
$
"!
&
)$
"
"
/
)%
"
"!
)
$A
" )
.
%
"
Q ++
+
L .# 1 +
&
# )
#)%
ray tracer$
"
+ +
)%
"
"
)%
"
&
"
+
)%
- "
"
"
"
) (
&
"
!"
(
")
"
)%
$
"
$
(
"
#-
)"
$
"!
" '
)"
&
" #
)"
2 " /
estructuras$
$
K
)%
)
( )
"
$ *!
)%
"
)%
!"
(
"
.0
.
"
" % .! "
$
$
"
'
(
" "
+
"
!"
8
"
(
" "
G! "
"
# "
5 .6
#
. (
(
.
"
"
"
" "
$
'
. "/
"
"
" .
"
"-
Main
" "
)
%
" "
#
(
"-
$ "
' $
"! "
# )
+ )"
)
"
'
.
"
" "
/
"
!
%
#
"
%
)+
" 3$
=; )+ /
"
"
8. (
"
&
I= )
'
"
" "
# )+
$
")
'
")
"
) /
!
%
;;
PuntoC
"
'
!"
"
" "
"
"
+
p1$
)
"
"
)%
")
.
'
& .
"
"
" "
(
&
"
" "
'
"
&
"
"
.
$
&
&
"
"
%
) . )
&
Address@
$
construccin
%
&
'
" '
"
) 2" # )
'
)"
"
9Load Local
$ *! ( # )
"
&
inicializacin$
"
$
%
"
& "!
(
& .
.
&
"
"
#
O
$
(
'"
"
&
O
)
" #
)
'
. %
"
& .
.
&
) ")
(
*
"
I= ) /
"
8
+ "
"
" / )
'
+
(
"
"
.
E )
'
"
" "
4D
# "
"
8
( 2
$
# "
" "
.
)) "
"
.
)
"/
"
$
.
"
"
"
$
.
& #
"
"!
(
"Main
"
.
)
"
.
" "
)
$
"
"
.
" "2 " +edx$
&
(
.
# )+ +
.
"
.
&
)
'
8
"
$
)
"
PuntoC
")
"! "
.
" "
,
# .
"
)
)
&
;S
PuntoS
"! "
$
.
K &"
" #
/
"-
"
&
"
$
A +(
" +
"
Console.WriteLine(p2.X);
& . .
.
$
)% $ " . ( #
Main ( # "
""
"-
")
.
/
'
"
)%
8
"
"-
)
"
&
"
" "
"-
"
.
.$
"
"
"
&
&
& .
(
"
A + "!
"!
" #
"-
!"
"
$
'4
"
"
"
)
%
. "
"
"
%"
!"
!"
" 2
"
.(
"!
'
"
).
" $
'
"
"
$
/
" 2
. 2
"
"
8
"
&
' &
" 2 $
&
&
!"
$
"
"-
).
")$
& .
.
)%
(
$
"
' &$
$
2"
"
"
;?
- "
' todos
8.
.
"
"
&
& .
"
'
)
"
& .
K
)
( -
"
Limpiar
%
( Limpiar
.
"
. "
/
valor$
"
(
( #+
4
& 8"
$
B
"
"
'& # +(
)
2"
"
!"
2"
"
"
&
" "
1/
)
) "
&$
")
"
(
"
'
2"
) $
# )- "
:=T
/ # )2"
:=T
"
"
(
!"
)$
(
& .
!)
' &
)3
-
"
# )
ValueType
(
"
System.Object$
( ValueType
"!
"!
"0
26
/
&
&
'
'
&
%&
")-
"
"
"
$
"! "
&
"
&
"
1
# )
#
"
# )2 (
! ;U
)%
2 "
+
&
& .$
"
$
(
"
" +)
"
"
(
" +0
"
+
&
"
$
)
"
/
&
"
(
$
+ &
" ")
" "
$
'
")
+
+
")
"
#
" ")
&
'
" ")
")
(
8
&
.
&
'
'
)
# $
& "
/K
( -
" ")
" "
/
" "
.
8
""-
$ KF #
ValueType/
Equals #
)
" & (
"
ValueType
Equals
"
+ .
'
8& +
"
"
GetHashCode$
.
&
"
3
"
$
&
%
"
Equals
)0 (
A +(
(
;T
" #
8
"
%
Equals$
" '
!"
(
"
"+
'
"
&$
"
.
&
) .
&
)"
" )"
# ) 2" " '
!"
"
"
(
Equals
"
" $
%) #
# #
) " "
2$
&
"
$
# "
(
GetHashCode
" "
"
&
2
Vector
) & +
&
)%
"
"
#
!"
"
"
"
"
.
xor$
&
& . hash
"
" $
")
(
")
"
"
,
&
hash
& 8
# )2 )
!
(
$
(
).
ToString$
"
+
)) (
&/
"
0 "
"
"
(
.
Equals
"
Vector
) 2"
2
)%
"
"
)0 (
$A
$
%
&
"
2"
"
(
- "
"
(
8
Equals
2
A "
K ) 2
(
"
"
&
"-
"-
2$ C
4 "
' ++ ) "
$
"
(
"
8 2 $
1
"
Vector
%"
"
"
"
" "
" /
"
""
"!
"
"
/
"-
'IFormattable
&
"
. ;V
"
"
"
3
"
ToString "
"$
."
ToString
"
(
ToString
&
"
"-
!"
"
"
"
"
!"
!"
$
"
"
"
&
"
"
"
&
""IFormattable/
)"
(
"
"
ToString
&
.
'
&
)
) +.
#
!"
'
"
"-
! %
" # "!
"
K( -
"!
"
$
"!
"
$ K &"
"
"(
"
%
$
#+
)
&$
"
)
%"
#+
)
"
$
"! .
' IFormattable$
DVector
&
2
2(
") .
E K &"
."
"
" "
6/ #
5
$
%
"
+
) " /
(
(
. 2"
& # )
) f
"
"-
(
(
"
)
'
"
)
"
# 2
"
'
) " /
)
"-
"
- "
&
#
" "
. "
%
"
&
&
)
boxing
")
"
&
!"
%"
S>
boxing
"
" $
+
"
!"
.
&/
"
"
)
)
(
( #
"
)
"( .
'
8
#
& 5
#
)"
6
. "
"
boxing 3
)
)
"
'$
"
unboxing (
&
(
'
"
"-
# #'
%
.
Vector
"
&
Vector v = (Vector)f;
"
0 "
&
" .$
*+,-
boxing
$
( - "
.
boxing
%
8
)1
*
# )2 (
"
tem +
Object$
ValueType$
#
"
.
"
G
5
'4
7
#
)
/
6$
"
/
.
!
!"
. +
'
"!
"
(
&
(
. $
"!
" # "
"
(
"
&.
&
"
"
. %$
. &
)
& +
$
+
Variant (
')
+ ").
+
"
" #
. " &
)
(
"
"
3 "
"
boxing
&
. %
)
"!
"
# +
+
)"
$
3
& =$>
)
5 )%
"
. )
.
& "!
$
S:
El Conocimiento Secreto
!"
2 "
&
"
$
!"
" 3
)
." #
" "
'$
) "
"
"
"
(
"
.
"&
"
)
'
"-
$
(
"
(
!
'$
)
" "
"
)
(
# +(
"
$
"
&
(
+
" IEquatable<T>
)!
$*
"
#+
'8
"
(
#
"
& .
"
'
) " $K
+(
"! 8 2
(
(
IComparable<T>
.0
)
1
( - # .
(
)$
)%
"
. -
"
1*
variables
" " $
""
2
.
(
#2 / K ( - " "
(
"
( vara$
)
+
"
$
)
# #
"
(
M
)
)
&.
&
"
"
)
(
&.
" (
1 R
variables
"
$R
)
"
"
K
variables de funciones
"
)
&
&
. (
)
%"
$ " .
2"
.
" (
+(
"
"
"
" "
&
& 2
'
"
!"
"
KC
"
& 8
2"
"
" /
"
cualquier
(
%
&
&
variable de funcin/
. "
%"
2" (
$A
5
& Media
"
#
"
( 2(
6
"
&$
!
(
)
"
. "
&
!"
/
(
)
")$
#
"
4
*+,-
#
" 5
"
! )
! "
'
3
6$
&
C
GG
B "*
C
+"
F
C
*
(
&
* *
&
*
I
A
'
"
"
"
)
. "
"
) "
"
" . (
&
+
!(
'(
"
&E
(
"
2
'
'
&$
"! (
"
. "
#
"
"!
+
"
/
double[] puntos = new double[]{ 0.0, 1.0, 2.0 };
Promediador prom = new PromedioRaiz();
Console.WriteLine(prom.Calcular(puntos));
"2 "
'
. 2
2
"
&/
'/
S;
"
' (
. "
.
")-
2"
. "
&
'
"
&
TipoEspecialAunPorDeterminar/
'
2 (
2
& (
# )2 #
"
(
"
"
$
"
0
(
&
"
. "
#
"
'/
public class PromedioRaiz : IFuncion
{
public double Funcion(double valor)
{
return Math.Sqrt(valor);
}
}
"
"
"
")
" # /
& 5
"
2
"#
&"
7 "
&
(
)
.
Funcion (
"
)
(
" "
& +
" /
"
- "
O
"
F '!
$ K ( -#
) 2# )
"
"
2#
'
=$>
8 )
)
(
+
(
2
&$
"! " .
( " %
Funcion
variables de funcin
&/
"
"
(
(
!) "
%"
" % 8
)
"
+
$ C.
(
) "
!"
SS
)
Math.Sqrt D "
=$>
"
constante de funcinE
")
"
&
"
)
2
'
&
( 3 +"
&
& (
&
")
&
&
"
&$
"
A
$
"
8
"!
)
#
"! "
&$
"
"
$
"
.
/
"
3
)%
. % $
)%
.
#+
. %
. %
.
"!
C # +"! "
"$
.
. + "
3
. %(
+
#
23
" (
"
"
&
$
"
"-
"
"
&/K )
JJ (
/
.
"2
$
")"!
".
")6
2
"
)%
"
)"
.
. %5
(
/
. " "
"
. + "
.
" +
B :$>
)
"
;$
.
.
$
(
"
"
"
J
J
. "
.
$
. /
& =$>
/
S?
&
#
"
/$
# )2 (
"
"
"
"
%
$
-
+
)%
.
"
.
& "!
&
"
(
. "
( 3
"
"
& "!
"
&
"
"
'
" (
'
Delegate
.0 " "
)
&
)
.
.
% ,
. "
$
'
MulticastDelegate (
"
Object$
.
"
+ ") )
") ) (
#
" $
&
&
"
")8
"
"
) '
target
& "
(
.
"!
.
"
methodPtr
"# (
)
"
&
prev
.
&$Q "
"
'
" "
. $
" $
$
& .
(
KF 2
'
")
8
& (
)
(
" "
.
.0
&
$ . " +
$7 "
%"
$
"
.
."
"
.
"
) %"
"!
"
!
0 "
"-
.
"-
""
!"
"
"
+
"-
$
!
"
"
) +
+"
"
"
'
&
%
/
"-
"-
"
Combine
Delegate$
.
"
$
#
cadena();
A "
"
")
!"
#+
& + # "
$
!"
0
+
" .
.
.
"
$
%
%
&
+
2
.
. )
" %
!"
$
/
(
"-
"
"
(
&/
.
"
#.
".
(
%
"
"-
!"
$
%"
$
/
"
.
"!
/
HazAlgoDelegate "
"
"-
! SU
"
.
" )
"
" $
!"
.
"/
BeginInvoke
.
#
!"
"
&" "
"-
BeginInvoke$
EndInvoke )
EndInvoke .
!"
IAsyncResult$
"
.
!"
"!"
"
$
+
IAsyncResult$
!"
"
"!
"
BeginInvoke
"
$
.
%
"
"
"2
$
. + )
+
"
2
# )
.
#
0
HazAlgo "
&
$
"-
EndInvoke ) (
# "
"A+
(
#
"
%"
$
(
"
"
!%
!"
"
#
# "
( HazAlgo # +
%
& .$
+
EndInvoke$
##
HazAlgo
&
&
#+
%"
"
'
#
"
"
/
// Otra forma de esperar por EndInvoke.
while (!result.Completed)
{
result.AsyncWaitHandle.WaitOne(1000, false);
OperacionNoMuyLarga();
}
// De todos modos, es necesario llamar a EndInvoke.
bool b = d.EndInvoke(ref s, out i, result);
IAsyncResult (
#
BeginInvoke$
% & 2
#
"
$*
#+
# #
" "
"WaitOne )
AsyncWaitHandle
BeginInvoke$
") (
# (
" #
(
#
2
"
%
"4
.
"
"
!"
+
(
" .
$
"
.
'+
+
# "
%
.
"
" %$ )
( siempre
# +(
"
EndInvoke 8
!"
$
# "
Completed
ST
'
KF -# 2"
%
(
2"
% &
"
'
+(
'
)
BeginInvoke
% &
"-
&
"-
( BeginInvoke
. /
# $1
2
(
!"
"
2"
"-
%"
"
Q
( '! "!
% & 2
$
.
.
"
&
"
"-
" .
&
!"
IAsyncResult$
"
!"
'
BeginInvoke/
%
EndInvoke
&
HazAlgo
"
!EjecucionTerminada +
" !
'$
. SV
% CO 7
"
6 K ( -O
"
5 "
$ O
"
&
)%
") .
(
"
&
&
"
.
2(
" 3!
+
$ KA
.
S>
2 !
+
"
2
+
2
)
" . & .!
)
$
"
8&
"
$
"
N
$
' ,
"! 8
$ KF - .
" +
$
'
'&
%
' &
2!
%)
"
3
"
Hashtable$ K
Hashtable
" "
"
)
"
IComponent
" !
(
'
(
&
$
$
"
'
. %
3
' $
(
"
%"
System.ComponentModel +
Component "
$
'IComponent
")
"
"
"
'
"
2
/
"
Site$
"
"
8. (
"
3 (
&
"
$
"
3$
# .
K &"
(
"
"
"
5 )
3
+
"
$ Q "
$
" &
"
"
. "
(
"
"
.
) & )
/ K ( $K ( (
)
"
9 $U=@+(
(
"
$
(
"
"-
+
!
' !
"
"
+ #
%
"
%"
"
)
+
'
5
)%
"
6"
$
Text
) &
")
3$
)%
! "
"
. "
"
"
"
"
) &
"-
"
"
'
"
!
(
34
O
(
# )2 (
"!
) &$
"!
"-
' &
"
"
"
$
$
(
componente
"
"
$
'
&
"
(
(
"
. "
" # "!
. %(
3
8
"
+
"
"
"
" "
&
&
2 " #
2$
&
"!
"-
(
"-
"
"
%"
"
"
"(
"
#
)
!"
$
#
"
"-
!"
$
"" "
)
(
$
$
" "
)
'
"
+ )
"
.
"-
"
/
(
8
"
"
&
'
&$
'
"
.
"
"
&
#
"
"
'
+
"
?:
else
}
}
" "
# +(
&
. "
. "
(
" $
.
&$
.
!"
" " #
&
.
!"
!
"$
(
$
"
)$
$
%"
&
")
"-
"
(
&
"
:$>+:$:
(
"
")
"
Edad
)"
/
2
)
=$>
"
" "
(
"
")
(
"" "
")
$
&
)
$
indexador
"
'
indexer
" +
9arrays@$ " .
(
# )
"
"
+(
"
)
&/
c[0]
"
."
)
. %
. %
JJ A ) 2 (
")(
)
.
.
B
JJ
"
"!
."
2
"
JJ$
"
.
"
"
8
"! )
%"
(
%"
+
'
(
)
$
"
# $
#+
(
"!
8
(
(
"
.
referen-
".
" '
%"
.
$A -
+
&
"
"
/
)
+-
! )
"
8
)
.
&
7"
?=
$ KC
"
"+ 2
%"
&
"
&$
$
+
!)
"
.0
[]$
JJ &
cia
."
$ KF -
)
)
"!
JJ$
(
"
/
"
" #
$
)2
v[1]$
. "
' v.X
2"
"! &"
2"
. "
v[0]
"
+
"
'
v.Y
Vector/
"
")
)
!"
. (
+ "
"
"
)
.
$
!"
)
"# $ "+ "#
+
"
%"
)
"
( /
"
&
B
)
" "
!"
!"
(
#+
!"
"
)
8
&$
."
"
"
"
" "
8
$
8
+
"
(
%
"
$
(
$
.
") .
DataRow (
%"
$
!"
"
!"
&
"
?I
*
"
"
"
."
*+,-
"
(
$ 7G$
Item +
"
")
"
).
")
(
"
&$
+
$
I# 3
" "
&
!
"
+
+ "
"
#
"
8
8
" 4+
"
(
8
" $
( 3
"!
"
"
"
" $
#
")
2
.
"
."
" 2 $
6/ ) "
"+
(
"
"+ 2
.
DataRow
'< ; E
*
!
Item
"! )
"
%
"
"
"
"
$
!
"
"
"
"
&
"" "
"
"
"
"-
"
"
")
") "(
/
"
)
$
"
$
2"
-"
"
" "
&
(
+
"! "
&
"
) "
'
'
") .
" %
#
'
)$
" "
"
" ) $
"-
(
$
' &
"
(
(
& .
"
2
Vector (
"!
"
2
"
# "
/
"
" &$
" %" $
"
) "
."
.
?;
.
"
.
. &
- 8 2 "
"!
"
2
&
8.
'
(
(
"-
"
"
#+
& .$
"-
"
"
"
" 2
$
'
.
) "
.
"
&
(
2 "
( -*
"&
"
(
$C #
&
2"
$* #
"
.
( -
"
$
" ") (
'
"
"
'$
/
.
#
"
Button
Click$
#
"
Click$
" ")
"
. $
2
"
suscripcin
.
eventos
# #
% ")- (
" Button
.
"-
&
. "
)
")
8"
&
" #
.
"
System/
#
2"
.
"
" " $
#
+
"
!"
)
)
)
)
.
) (
"
"
)
!"
(
)
"
EventArgs
EventHandler/
"
"
(
+ %"
"
8.
(
"
") . ,
"
"
"
'
& "
"
"
&
&$
"
"
?S
&
8 2
+
"
.(
"
"
"
"
.
"
( "
"
$
)
(
. & + " +
. (
")" 5(
6
"
. & +
/
.
)
$
3
"
"
" .
"
" %
."
.
!
"
.
.
(
"
/
. "
#
"
"
A
" #
"
N # " %
"
)
" # "!
$
"
" "
!"
%
$
"
(
# )2 "
.
. %
"
"
"
2
. " &$
A + B$
"
A$
"
/
{ Esto es Pascal }
procedure B; forward;
procedure A;
begin
end;
procedure B;
begin
end;
??
8
(
(
+
.
+ 8
.
"
3
"!
$
"
$
%
"
"
.
(
")+
(
+&
"
&$
&
X M #$
$
N +
" "
" %"
"
/
) .)
3
" "!(
(
3 . &
'!
+ # )2
$
" "
&
%"
!
"
A "
5 ! 6
2"
"
B +
"
'
"
3 U>
" )
.&
.(
$
(
#
N
&
"
")"
& (
"
"
"!
$
" ! "
""B$
#
"+ 2
( "
& (
# N
U> $
" "
"+ 2
&
"
!
!
.
$
tracta
)
..
#
"
"
"
&
)%
$
#
2
"
"
" "
"
."
)
!"
$
& .
)2
"
"
. % "
"
0 "
" '!"
" " (
$
) 2"
'
"
"
"
8
&
& .
$ #
)
#
! 9 (
)
@/
"
"
& (
A
"
+
=$>/
clases parciales$
)
" "
#
&
$
.
" "
# $
%"
A#
."
(
"
(
$
"
/
&
"
."
A #
."
&
" (
+ ")
&$
."
"
"
"
)
) "
(
)
'
& #
2
)
0)
+
'
" "
)
"
!
$
$
' $
A#
%"
'$
."
"
"
System.Object +
" "
'IDisposable 9 $UI@/
! ?U
2"
%"
# )
"
&
"
&
"
)
"
&
"
'
&
"!
."
"
")
."
$
"!
$ " "
&
7
) )
+ "
.
" . "
=>>I/
Form1.cs (
& . .
" "
#
"
"
.
7
(
& .
"
"
"
)2
-
#
" +#
" . "
#
$
"
"
Form1
8
+
"
)
#
Form1.cs
"
'
)
2
/
?T
"
#
'
(
& cs$
#
$
Form1.Designer.cs
Form1
$
"
"
B
'
#
"
&
"
& .
" . $
resx
#
#
Form1.cs
=>>S
"! "
. "
+
.
#
."
8
& resx
& . .
" "
# 4
7
=>>S/
.0 "
"
" "
"
)
& =>>I 7
%
& .$
7
'#
."
/
7
) "
$
& . )
(
)
"
" "
' &
#+
' &
"
'
+
"
$
."
"
"
"
"
."
$
%"
// "Nuestro" fragmento
public partial class A
{
}
// Fragmento administrado por Visual Studio.
partial class A
{
private int i;
public A()
{
this.i = 1111;
}
}
- "
2"
"
)
$
"
)
(
%"
&
8
" "
& I
6
# +(
&
" + "
"
&
' &
' &
"
'
"
"
# )2 " +
+
'
$
) " $
"
.
"
"-
"
"
."
'
%
/ .
"
&
"
mtodos parciales$
)" /
' &
(
" # "+ $
"
"
.
)
"!
$
."
")"
"
&
."
"-
&
)
&
."
&
"
"
" " "- $
."
/
. ?V
this.Evento += Respuesta;
}
}
%"
OnCreate
"
"
+
anuncia
."
+
# "-
$K
"9K
( - @$
%"
OnCreate +
$
"
"
(
"
"
"
.
2 & .
"
/
.
."
. #
" %
2
.
'
$
"
& .
.
!U>
# "
' & (
"
'$
"."
OnCreate
"
!
)
)
8
OnCreate
/
"
%
"" "
$
&
"-
OnCreate
+
!
" (
(
"+
" "
V>
*[
$
+ "!(
O
8
&
" '
)
&
9garbage collector@
)!
8
#
" #2 "
" $
.
"
"
"
generation scaveng( " %
"
% &
. " + #
"!
!
'
') $
T> +
'&
$
)
. %
)% " + "
) " %
"!
" "
)
$
. %
" $
#
8
"
$
)
. "
%
$
T>
)
ing
1\
. %
+ .
(
O
"
3 +
"
"
)
$
"
"
#
(
&
+ %
%
" "
"
$
"
"
)
# +(
.
(
(
)
)
(
G X + # )
#
"!
&
" 4+ .
%.
).
.
+
8 3
%
&
(
)
"
" 8
"
$
$
")
&
.
.
"
$
3
] $
2
/
Si nadie te ve no existes
"! 8 "
&
!"
% & (
)
&
/
+
!
)%
)
" "
(
!
.!"
( "
(
"
8
" "
%
)%
vivos
)%
'
4K
+( (
" /
)%
! #
"
(
-
)%
"
M #
!"
"
"
races$
races$
" "
'
(
" "
. "
)
)
&
"
"
"
"
&
"
$
(
2
"
&
)%
)%
")- vivos$
.
& %
)%
raz$
)%
!
2
$
"
" "
")-
K
% "
.
.+ )
$ A
)%
" #
. % " )
$
( 3
)%
# "
"
2
/+
"
$
(
+ "+
"
"
"
-"
)
&
)
"
"
+
"'
&
")
"
"
.
$ "
8 " $
%
!
&
% &
"
.
.
"
&
. +
)% $
"!
" +
-
"!
G%
. "
!
&
JJ/
Object creation is resource allocation
"
/
"
" (
(
/
6 .
& 8 2
&
5
)
)%
)%
6
#
)
"+ 2
"!
$ "
)%
) "
(
)"
"
(
6$
8%
&$
8 2
"!
)% (
)
(
"+ 2
"! ) %
"$
)"
"
'
) &
4+
)%
#
" " $
"
#
$
" "
") ( # + " # #
)%
"
&
&
&
) "!
"
2"
+
"
&
" '"
"
"
"
(
%
"
'
"
"!
(
. "
" (
4 +
( 2
"!
)
!
) & .
8
"+
&
. 2
)"
(
5
"
&
&
$
"
&
K
"
(
!
$
! .
(
"
(
4
&
'
" "
B
)
(
8
)
"
)%
#
"
" %
/
"
$
JJ/
."
" #
Stream D 2
"
"
!U=
Recurso$
.
)"
%"
& .,
Recurso
' &E
. 8
' &$ C # " "
" ' # +(
1 " File( -$
"
"
/
-$
) "
)
'
( -" "
#
.
%
$
& .
& .
%
" +
$ $
.
' &
"
' &
"
"
")
Dispose$ *! 0
"
)
/
' & +
$
" ")
" #
' "5 " 6
+ )
)
&/ " +!
"
"# "
"
3
"
&
"! )
/ " "
) "
. &
"!
"
8 '
"
#+
&
"!8"
"
$
$
&
) $
)
") .
" '
. "
$
"
)" $
" $
&
"
$
'
% (
")
& $
%(
" (
" "
'IDisposable/
"
(
(
" "
)
"
(
(
)" .
"
) 2
"
'
% &
. "
"
"&
IDisposable
Dispose$ #
)
"
) "
'
(
&
"
/
ClaseConRecurso objeto = new ClaseConRecurso();
try
{
// Aqu usamos la instancia creada
}
finally
{
IDisposable d = objeto as IDisposable;
if (d != null) d.Dispose();
}
&
"
# +" #
"
)
&<
.
)
.
"
!
#
3
& .
.
'(
%
(
" "
$
(
&
8
& .
"
,
.
(
( 3
.
!
#. $
" "
"
( #
"
&$
.
)
&
$
2
B
. " " %
&
.)
$/
+#
2
"
(
#
& (
" "
&
)% (
"
)%
'2
$
&
"
"
)
IDisposable/
UI
"
( #
%"
"
)%
"
zombie
*+,-
&
#+
$
" $
2
)
&
)
.
)%
SqlDataReader
$)# !( 11 $
)%L
E
E
M0 ''
Dispose
$
(
4
(
" "
&
"
. &
"!
( $
'
" + )) (
&
)% (
" "
&
)
*<
"!
)%
*J
)
)
) "
"
.0
"
"
"
garbage collection$
") . (
)
&
" "
" # "! .
)
) (
)
&
)
$
" 0 "
.
"
"
" "
&
"
$
!"
)"
%
$
.
"
'(
"
&
"
$7
"
) "
&
"!
" "
)
%"
/
public class ClaseConRecurso
{
private Recurso recurso;
ClaseConRecurso()
{
// Este es el constructor
//
}
ClaseConRecurso()
{
// Este es el finalizador
}
}
( "
"
"
"
"
"
)
(
Stream/
private FileStream recurso;
/K
"
ClaseConRecurso()
{
if (recurso != null)
recurso.Dispose();
}
!U;
'
Recurso$
" File-
-$
$ $
/D
.
E1' " /K ( ! %
'
(
)%
ClaseConRecurso # "
(
" )$
K# ) 2 .
"
)%
. #
recurso
"!
))
(
"
$
0
)% ( "
)%
#
recurso D
! E9
- @$
(
&
"
# #
( FileStream
$
$
.
( FileStream
" +
'
.
#
$
#
recurso ! ")' &
ClaseConRecurso
)
$ K ! )% 8 " ! "
D
"
) ) E
"!
)) (
#
.
!
. (
" "
&
)
/
"
" "
!" $ D
(
.
'(
#
(
) (
"
"
(
"
"
) "
+ )
)%
)%
$
'
"
"
"
) "
" Application$
"
)%
2
Application
$
"
&
&
" " +
)%
"!
"
.
)%
'
Idle
.
#
. ahE
)
#
) " "!
+
(
&
&
"
ThreadException$
+3
.
1
" )
(
.
"
N
N
t0
. " "
"
)%
2
"
. "
"
)%
"
(
.
"
t2
"
" $
"
)
)
$
"
&
"
t1
) "
&
2$
+ %
#
)%
)%
"
.
%
.
)%
$A+
)%
2
" $
.
)%
. $
0 "
Dispose
"
"" %
$ "
)% (
)2 # ) "
.
&$
.
(
"
Dispose
)%
#
US
R\
"
4
"!
1 G O
(
!" . +
" %
+ . "!
"
)%
)0 (
"
"
'
+ 2#
#
!
"
#
"
#
+
&
%
"
"
"
+
JJ
. - $
" #
. - $
)
$
3
(
)
"
"
. (
)%
)
2
8. (
. % (
"
"
'
. (
" $
"
% &
' "
3
#
1
"
' + .
JJ
'
"
+
"
"
.
JJ (
plantillas$
"
$* #
)"
"
) " $
GO
"
. #+(
" "
"!(
$
& . .
&
"
"!
#
&
%
!
" $
(
"
"
%+
.
$
"!
"
&
. -
&
"
(
$
.
"
" .
'& .
templates
")
) " /
"
. JJ .
"
/
" "
&
.
&
) .
+
"
"
% &$
"
"
)%
"
&
. %
$
" #
!
") .
- "
. "
tipos genricos +
) "
$
"
"
)%
" +
"
& )
#
"2 " $
B
(
&
sui generis
"
+
"
# +O
+
2" (
%
)%
. %
. %
)
+
"
"
. -
O
"
"
.
"
$
"
"
8 "
. %
"
$
&
8& $
/
& . "!
$
)
'
"
)
"!$
"
.2/ " " cliente
.
+ " "
" "
"
+
# )
.
/
.!"
"
. . - $
)
&
0
8
" +
)) (
& . (
& . (
. - $
. -
"
. proveedor
" $
)) (
'
(
. -
. "
" #
' %"
9
2
(
)
"
. " &
8 " $
&"
.
"
@$
)% /
")- "
. - /
Pila # "
!"
& #
' "
'"
" "
#
(
"
"
$
Pila
/
. "
!"
"
!"
T$
"
8
&
"
& + # "
$
"
T$
T
"
T
"
!
8
"
"!
!"
$
T/
"
" .
"
"
# 5 "!
&
6
$
. -
%"
) $
(
(
"
2
#
!"
Pila
.
&
!! UU
"
!"
")
!"
# "
!"
'"
TipoNodo 9D
"
E@
"!
(
"
$
"
(
"
'
Pila$
. -
5
" "
"
"2 "
"
$K
$
"
"
. - $
!"
$
"
"
"
&
"
Equals (
"
"2 "
&
8%" (
& $ KF - .
5
"
"&
"
(
"
"0
"! %
.
%"
(
$
$
. .
.
$
$
&$
. "
$K
"
8.
"
.
!
"2 "
"
(
2"
" "
&
.
(
"&
"
Pila &
"
(
"
(
.
'
'
!
)
Pila/
IComparable
2
/
CompareTo
""
)%
.
%.
"
"
)%
"
3
+ )
.
"+ +
") )%
"( %
.
"/
"
)%
.
$
8
&$
public T Menor()
{
if (cantidad == 0)
throw new Exception("Pila vaca!");
T menor = elementos[0];
for (int i = 1; i < cantidad; i++)
if (elementos[i].CompareTo(menor) < 0)
menor = elementos[i];
return menor;
}
(
"
"
"
System.Int32
'$
!UT
)" (
(
(
"
<$
" (
"
#
' "
"
" "
IComparable$
&.
+ .
!IComparable
" 8 2 "
CompareTo$ KF (
.
$
%"
"
2"
( " "
"
2 Menor '
%
2$
5"
6
"
" %
!"
"
+
"
.
"
"
# +"!/
&$
&$
CompareTo
"-
(
2 "
' / boxingE C +
4
".
ICompare
"
%"
)"
'#
"
)% $ K &"
boxing
'. -
)
#
!"
" ) $C
2" (
&
(
)
&
"
&
& :$:
=$> 8
IComparable
(
1
"
.
(
"
"
. /
"
&" "
"
&
&
'
!
"
"
#+
.
"
!"
%"
IComparable
.
*+,-
)-
& . %
"
"!
" #
!(
*
&
"!
"
*
'
IComparable IComparable<T>
Menor
C
"
:$:
&$
2"
8. (
!"
"
'/
2"
")- (
"
" #
&
"
"
"
TipoBase
"
(
(
?
(
? '
(
?
"
!"
!"
!"
"
(
/
)
)
)
$
$
0)
"
!"
0 "
0)
!"
!. UV
"
"
(
.
")
+ 8
#
$
"!
. " mtodos genricos$
/ ". "
2(
. - $
."
(
M
N Q " (
'
. - $
! "
2
""
.
"
(
&
" #
. "
(
$
. "
Pila<T>
" %
2(
" #
#
/
"
"
Vaciar 9
"
"-
Pila@
$
"
"
") .
"
"
")-
VaciarPila(p);
"
)
"
(
# +(
inferencia de tipos/
"
!"
!"
"- $
. -
$
"
"
"
.
'(
( )
. %
(
. % 2
"
%
"
".
)
' +
. ( 3 . (
"
' '
"
8
"
$A +
"
& " . ) /
Min (
$
0 "
-
) 8
"
&"
&
' %"
#
") System$
"2 "
"
#
)
"
$
B$
$ 8
"
! Math
""
$ & "
-
.
" "
/
public static decimal Min(decimal d1, decimal d2);
public static long Min(long l1, long l2);
."
" $
(
(
2
.
"! (
"-
# )
)) (
. - /
)
Math
"
0
&
"-
T>
"
Min
."
"
'
"
-"
" "
8
" &
& $
."
/
"
."
"
"
."
". - Min<T>
T
$
.
."
"
" " $* ' "
"
8
.
#
$
# +$ " ) "
"
"
&
)
. / " #+ 0
"8
"
$
."
%"
. "
"!
"
.
"
)
+
.
"
# "
"
%"
."
$
.
( %2+
'&
"
."
8.
+
)
.
8
"
&
.
" - $
)
"
$
&
(
&
( T
"
& " 2
"
&
K" .
. "
2
. % ")2(
(
"! "
( (
"
2
"
/
// Esta es la nica salida:
Console.WriteLine(Math.Min<double>(1.0, -1));
%"
.
+
"-
"
!"
. -
. -
Array
%"
."
'
"
"-
(
$
"
%"
(
# +(
.
!"
)
(
" "
&
. "
unificacin
"
%
(
-
.
$
)
"
4
8
&
!"
" naked constraint
.2
"-"
& .
. -
. 8 3
restriccin desnuda$
!"
&
. -
"
(
" "
(
!"
T$
)
(
8&
. - $
%"
'$ *!
.
0
)
( 7 " /
) (
"
!"
'
" #
(
.
"
"
"
"
!"
4K
&
"&
)
" "
"
. "
"
(
& +
!"
$
$
"
)
'
( ."
&
'$
(
(
.
T:
.2
. %
. '
"-
. . -
%"
.
"
"
"
0
"
."
)
)%
)
.
$ *!
.
"
( )
&/
"
"
) "
&
") . K
& 1
(
(
%
"
"
$
"
A+
. %
*+,-
Length
&
)% (
(
"!
!")
"
"
3
$
%
.
"
&
&
2(
"
/# "
(
'&
"
"
!
")
.
"
&
&
)"
"
.
$
)%
debera
) 2 # '
& )! "
local$
"
. 2
%
/
$
"
8
1
!"
$
&
&
"
*
.
&
"
&$
'
/
D
9
4
2 "!
#)
"!
" "
"
.
)
1
& " +
'
"
C
D
(
"
" .
.
2
(
&
"
$
)
. -
- "
. -
$ "
(
(
)
4+
"
"
T=
. &
1
"
69
"
" @
" )
#2
)$
"
$
. "
" %
"
( '!
2"
"
&
2"
"
& / K( )%
"
" "
"
&
"
%
+
"
2
"
&
& .
restricciones desnudas (
0
."
"
$C
!) "
( 2
&$
& ./
public static class CovariantConverter
{
public static List<T> Convert<S, T>(List<S> source)
where S: T
{
List<T> result = new List<T>(source.Count);
foreach (S value in source)
result.Add(value);
return result;
}
}
!
"
"
$
")
)
"
CovariantConverter
$
!"
$K
$
+
$
.
"-
Convert
. -
"
)
.
(
( -
3 "
&
"-
.
&
"
!
"
. -
&
!"
"
"
Add
"2
"
"
"
"-
"
Convert$
"
*+,-
'(
"
"
&$
The C# Programming Language
7=
#
'< 7
O
."
&
'
5
"
%
. +
"
#
$$
.
(
!
."
" # "!
'
# # # )
"!
+
"
"! "
+
"
"
"
. -
$
. . -
%"
."
.
( .)
")"
%(
!)
(
"
$ A
"
2
"
"
$ KF -
"
"
"
&
"
"
&
"
"
Dictionary
.
!) )
/
&
!"
. -
&
. -
"!
"
+
TI
%
"
!)
"
"
# )
$7"
!)
( ) ' "
Node
BinaryTree/
namespace IntSight.DataStructures
{
public class BinaryTree<T> where T : IComparable<T>
{
protected class Node
{
}
}
}
!)
")
")
"
2/
IntSight.DataStructures.BinaryTree[T]
IntSight.DataStructures.BinaryTree[T].Node
)
(
) 5#
"
$
Node$
5#
6
%"
. -
!"
$
(
" &
"
!"
8
" +
!"
"
. -
. -
"
B$
2/
IntSight.DataStructures.BinaryTree`1
IntSight.DataStructures.BinaryTree`1+Node
( 2
3
+
")
"
")
"
"
"
"
.
0"
" "
.
$
Node
&
. - /
!"
. ")
")
$
'
0)
"
T;
$A
# +(
8
"
"
(
"
#
!"
!)
'(
!"
&
"
&
+ 3&+364/,+
Contains
Node
&
BinaryTree
2$
"
!
" "
"
)0 (
"
2
'
!
.
!
&
!) (
!
"Contains
Node +
!) /
!)
"!
"
"!
)
&
bles
Add$
&$
&$
(
%+
. -
nullable types/
"
" !3
"
!"
" $
(
# # #
" +0
&
tipos anula-
)%
TS
&
") .
$
" .
"
"
,
=S?
=SU
$
"
"
"
) "
" 5
"
"
"
&
6$ 8
&
)
"
"
#
"
"
# +(
- "
2"
"
)) "
)+ + "
*
"
F
"
"))
)+ $ K !
"
(
. 2"
"
& $
2" (
# "
2
"
"
"
"
+ "
$
"
& .
)
. $
. " +
(
8
&$
%"
"
F
(
)
" "
x$
"
+
"
K !
"
"
(
&
" x y
"
."
(
"
8 2
"
"
private decimal x, y;
."
")- (
"
&.
"
+"
"
" 2
/
# "
nx
!
!
"
"
"
y$
"
ny
"
"
"
"
(
.
"
+ .
/ K &"
if (nx || ny)
nz = true;
else
{
nz = false;
z = x + y;
}
"
$ KC
)
"
"
)
(
&
X
"
(
* !
!
2
&
"+
2 "
&
"
&
.
$
K
=S? "2
) /
) + "
.
.
"
#
&
"
".
)) )
. &
& )
")
- $
&/
2
+
T?
&
. -
System.Nullable<T>
Nullable
"
"!
$A +
Nullable &
"
Nullable<String>
Nullable
"!
( 3 2
String
'
F
&6(
"
( -Nullable
2" (
" "
Nullable
(
" "
" "
+
")
"
( -
"
")" Byte??$
"
&
"
)
E
"
"
B
B$
&
System.Nullable$
"
Q! / Nullable
!"
!"
"
% &$
.
&
)$
(
.
/D
"
"
"
7 "
# '
"
"
/
$
&
Nullable
Byte?
. (
"
. -
System.String
"
5"&
&.
."
$
(
!"
K
!"
C # +(
$
"
" +"
'
$
"
Nullable
( -
Nullable$
&
"
%
"
2
Nullable
. (
(
) $
"
"
int? i = 1234;
int? j = null;
)
3
)
")-
"
"
&
.
2
"
!
$
!
&
8
")
"
Nullable/
Nullable<int> i = new Nullable<int>(1234);
Nullable<int> j = new Nullable<int>();
"
"
/
int? i = 1234;
int j = i;
" "! !
"
&
"
Nullable<T>/
public bool HasValue { get; }
public T Value { get; }
# ')
"
"
/
! TU
int? i = 1234;
int j = i.Value;
%"
"
(
Value
2
8
"
2"
) i
2
$ KC
8
&$
Value
")
HasValue
"
"
/
int? i = 1234;
if (i.HasValue)
{
int j = i.Value;
}
%"
Value
( 3
.
%" $
'
# + .0
"
GetValueOrDefault (
"
) "
"
"
) 4
8
&/
"
2
&
&
&
Nullable
int? i = 1234;
if (i.HasValue)
{
int j = i.GetValueOrDefault();
}
"
"
GetValueOrDefault
&
" + "
public T GetValueOrDefault()
{
return this.value;
}
GetValueOrDefault
"! "
"
"
HasValue +
)
)%
$
.
"
/
)
2"
" &
2"
"
)
. $
&.
,
.
- "
2"
%"
)
2"
)+
$
8
GetValueOrDefault (
"
" &/
&
2"
) & .
"
int? i = 1234;
int j = i.GetValueOrDefault(-1);
&/ "
"
i
(
8
. " -1$
") . 8
" %
GetValueOrDefault/
"
operador de fusin 9coalescence operator@
.
. &
/
0 "
j +
.
"
int j = i ?? -1;
$
)
TT
%"
"
.
.
!
"
$
.
(
)$
( &
"GetValueOrDefault
%
.
(
"
"!"
8. (
0
$
%"
.
)
8
& " %
. $
&
! ).
*+,-
$ GetValueOrDefault "
!"
%
.
(
2"
!
)
!
.
$
"
F
2 (
"
)
"
"
")# )
)
" operadores promovidos$
8
&
.
"!
)%
"
( 2
$ K1
(
8
(
) " +
#
"
"
&
lifted operators (
2"
" " (
8
&
$
B$
")
.
( %
!)
(
"!
F /
int? ni = 1000;
int? nn = null;
ni = ni + 1;
Console.WriteLine(i);
ni = ni * nn;
Console.WriteLine(i);
"
%"
) +
)
) ni$
&
"
&
ni$
Nullable<T>$
"
WriteLine
"
&
ToString
%
ToString )
"
'
"
$ "
. 1001
+
.
$
%"
2
$
" "
"
"
ToString
"-
.
)
"
.
"
2$
-
) (
&/
ni = ni * null;
2
2
$
"
. " +
F 4
.$ KF -
(
&
"
(
! "
ni
"
2
"
"!
8
) 2"
&
"
$
(
(
2
"!
F
"!
.
8
."
8
.
"
& .
int? ni = 1000;
int? nn = null;
if (ni > nn)
Console.WriteLine("Mayor");
else if (ni < nn)
Console.WriteLine("Menor");
else if (ni == nn)
Console.WriteLine("Igual");
else
Console.WriteLine("Este mundo loco, loco, loco...");
#
"
"
! " (
. TV
El Conocimiento Secreto
1
"-
(
. "
& .$
(
% (
"
."
"
)
"! 8
2
(
.
)
(
.)
"
$
& (
"
)
"
$(
$
"
)
&
"
8 /( ")
&
!
. %(
"
))
"
# "
( "!
).
(
(
%
2 $
8
+
. "
& "
"
. %/
&
'
)
( 3
&
" $
"
$
&
$K
.
'
&"
"
&
. "
%"
Boolean$
(
" + 8) $
' )
)) "
8.
B
. %
2)
( # # #
2
$
8
. % )
+ 8.
(
8
& (
( (
"
. %$
&
( -"
iteradores
. % "!
&
!
"
3
. %
$
))
/
& "
# )2 (
(
"
"
#
"
(
2
&
$
&
.
&
(
"
"
$
.
&" preparar
&
' contenedores
!)
"
&
) "
"
"
"!(
$
"
"
"
"
& +
)
"
$
%
"
"
"
.
(
)
&.
'
&.
"!
&$
"
.
"
&
&
2
5
" +
"
"
. "!
)
.
&
(
)
8
)
)
Boolean
"
.
$" "
64
+
(
"!
'IDisposable
!%
"
&
2
"
)
" "
( /
F
)
(
)
8
"
&$
)
"
4 K( -"!
' IEnumerable
IEnumerable
"
") 9K
7 "
"
"
(
+
F
0)
)
$A+
'IEnumerable
8
&
" "
") System.Collections$
" "
System.Array +&
)
$
"! "
"
9 "
8
.
IEnumerable
&
@+. '
" "
"
@$
IEnumerable/
&
IEnumerable &
' IEnumerator
"-
System.Collections/
")-
."
(
&
8
"
&
"
&
.
"
"
IEnumerable$
"
/
"
& "
K
( )
"
"
"!
& "
&
"!
IEnumerable
"
IDisposable$
# +(
#
'
"
(
IEnumerator$
(
%
GetEnumerator
! "
&
)
/
"!/
+
+
-.
.V=
8
.!
3
&
(
" "
&
IEnumerator (
) ."
" "
)
"
'
"
-.
A+
+
"
8 2 $
=$> "
"
!
)
"
"!
IEnumerator
" .
"
& :$:$ K
2"
0)
")
Current
/
.
'
&
)
&
GetEnumerator$
IEnumerator$
" " T
"
0)
$
%(
tipos genricos
"-
&
0)
&
GetEnumerator
GetEnumerator$
(
/
IEnumerator 5
86
Current (
!
(
"
"
& +
)
Current
"
&
"
$
"
"
"
5
6
%
" "!
)
)
"'
(
#
(
"
2
"
&
"
(
(
&
%
"! (
#
.
"
"
O
)
"
+
)$
"!/ # +
& .
(
'
)
"
"
2
.
"
) (
&
"
& =$>
# )
""
.
. .
"
) (
'$
& 6$
&
.2
/
&
IEnumerable IEnumerator
"
)%
$
.
8
. "
mtodos iteradores$
5) (
& &
)
$1 "
%
"-
8 #
"
"
Q +
BinaryTree = class[X]
public
iterator Nodes: X;
end;
JJ +
)
"2(
+ "# $C
" 6 # +(
"
2
/
Nodes
"K &"
"
) (
&
) (
&
%"
)
"
"(
8 " /
VI
yield
yield
yield
yield
return
return
return
return
yield
yield
yield
yield
0;
3;
6;
8;
return
return
return
return
1; yield return 2;
4; yield return 5;
7;
9;
}
}
Digitos
") (
"
/
Digitos
!
+
&
(
$
"
& . "
" 2
"
2
.
"
> V
2 $
"
& &
"
/
foreach ()
{
yield return x;
}
"
"
(
#
"
)$
.
)
(
)
$
&
.
" &
)
+-
&
2 "
"
.
2
%.
"!
"
&$ A )
"
2
)
$
&
2
"
corrutina$
++
)
!
(
)"
&"
"
exactamente
"
"
'
& .
"
'
"
.
&
yield return x;
"
"
"
"
"
.
"
7 "
%"
0"
"!
Q)
"
& "
$
&
)
"
"
.
&
( "!
"
"
(
)! $
&
+
$
'
$
(
")- # +(
"
)
)
'
.V;
"-
_estado = i
_current = x;
return true;
i:
"
.
.
+
(
"
' "
/
MoveNext
"
2
$
$
!
j += temp;
}
}
"
%
)
0"
.0 " "
E
2
$
%"
.
)
"
(
.
"
&
+ 3&+364/,+
IEnumerable
P
D
'
Fibonacci 9
D
9%$)"
KF " "
!)
# $
" "
& (
'(
"
BinaryTree
"
"-
&
!) )
7+ "
"
.
!)
"
$
"
"
&
#+
"
8 $
Stack (
'"
#
"
"$
"
/
"
$
"
$
$
"
8
"
( &
8 2
"
&"
VS
if (right != null)
foreach (T valor in right.NodosRecursivos())
yield return valor;
}
K7
) "
'(
'
"))
!) "
"
&
" "
$
"
"+
"
8 $
$
" +!
!
+# ) 2 (
" "
&
. "
&
(
2 8
%
"
. "
$
. % (
"
"
%
"
""- 6
9 . " + 2@
!)
)
) "
!"
" 5
.
"
"
/
"
(
)
"0
'
$
"- $
. (
6$
"
2"
"
(
.
"
"
"-
Action
. -
'
Recorrer
!"
System/
""
&"
(
. "
8)
"!
"
"
"
.
.
"
(
$
!"
$
"!
.
Action
&
2"
2(
"
- /
"
2"
2"
"
# ) # # ( Action1
&. $
2
"
"
5 .6
"
' abortar
$
"
"
& "! "
" . (
"
(
"! /
"
$
"
+
.V?
+(
. "
'
&/
&$
2"
!"
).
!"
2(
!"
$
"
(
"
" '
"
'
(
" '
2"
$
"
!
2
$
"
"
$
"
"
E
#
( +
!) )
"
)
.
"
"
&"
4D
"
&
" '
. " 2
"-
"
"
"
"
&
"
.2
ForEach
"
2
'
"-
Node/
public class BinaryTree<T> where T : IComparable<T>
{
protected class Node
{
public void ForEach(Action<T> action)
{
if (left != null) left.ForEach(action);
action(value);
if (right != null) right.ForEach(action);
}
}
}
KA
"-
( -! #
)
"
+(
' 2 ForEach
$ .
&"
.
"
& 6/
2/
"
2"
"
Console.WriteLine
"
"
ForEach # 2"
"
"
"
(
$
"
(
%
( 2+
"(
"
) " /
"
$
)
& " $
ForEach (
"
ImprimirNumero$ K &
"
"-
"
.
."
'
!
& .
$
)
.
/
&
"
" -
) "-
'
")
"
#2
&
5 & " 6$
"
"
,
""
"-
.$
!"
"(
& "
.! VU
. $
! %
" " .
& " $
.
2 "
!
"
(
+ "!
"
!"
"-
"
B
)
"$
ForEach +
"
.
""%"
"
$
"
& (
( -#
"
'
"
."
)
"/
& .$
"
")
&
& "
'
'
""
" +
$
"
"
& "
)
8
"
"-
-(
#
")
"-
& " $
"
-"
!"
$
'$
"
" # "!/
int count = 0;
tree.ForEach(delegate { count++; });
"
(
(
-
*+,-
" "
2
2(
!"
"-
)
& "
$ $
)
)
)
"
(
9
""
+
& "
) "+ "
expresiones lambda (
'
B$
")
"
!
& I
. %
. " &
#
2
8
( & " $
. -
".
.
"
8
&
+
. %$
&
")
3
"
)
"-
System.Array (
F
! "
-
)
(
. %
!
3
%"
!
B
. -
"
/
public static T[] FindAll<T>(T[] vector, Predicate<T> condicion);
FindAll
)
.
"
& +
&$
"
&
"
/
(
"&.
"
.
0"
"
"
Predicate
)
&
.VT
+ )
%"
/
" + # "
"-
FindAll +
&
&
")
"
& "
"
$
"
%"
FindAll
"
8."
"
) "! "
"
& " $R
/
"
"
"
.
"2
$
"
&" #
&
&
") $
(
#
$
)
%" /
"
"!
"
&
(
)%
"
"
"
+
4
delegate(int x) { return x % 2 != 0; }
(int x) => { return x % 2 != 0; }
(int x) => x % 2 != 0
(x) => x % 2 != 0
x => x % 2 != 0
"
&
& =$>$
"
&$A "
")
&
2
")
B
8
)
.
"+( -
")
& "
&
" )
"
(
'(
" $
.
" +
"
"
$
).
"
$
"
) (
)
8
&
!"
!"
"!
"
)
/
"
&
"
"
"
!
2
")
.
+
=>
.
+
. # "
& " $
"$
&
") #
&
"
)%
&
"
B I$>
" "
!
/
"
8
& ") 4 "
(
)
$
(
"
". - FindAll
"
!"
FindAll
%"
# "
)
8 2 "
!"
B =$>$ D
" -) E
"
!"
" "
"
0 "
& "
"
$
!"
+
) (
(
) (
.
8
&$
(
8
+
"
&
$
FindAll
"
"&
&
!"
8
"
x/
& +
+ "
&
"
(
") $
x => x % 2 != 0
"
& (
)
"
/
"
FindAll
&
.
!"
"
"
x +
FindAll
"
% (
"
.
)
B I$>
0"
( $
"
"
!"
.
&
"
. %
"
&
new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
$
$C # "
"
&
/
// Antes
// Ahora
(
.
.. VV
K !
K !
8
8
$ " .
&
8
")
)
"
8)
"
.
.
) &
/
"
"-
"
'
"
"+
)" /
") .
"
( %
"
eh1 = eh2;
(
$C
& 8 2
"
'(
(
8
"
&
/
!
AHandler
(
&
"
+ )
%"
% &
(
.
!
&
"
2
"0 Delegate
" !
%+
"
"
. $
& 2
AHandler
(
"
$*
"
"
&
)$
8
"
")
)
"
(
.
&
" )
8
(
) "
!
.
. -
.
.
$
"
"
)$
+(
$
System/
4+ 2
"
&
#
")
!"
# "
%"
0"
&
&.
Func
"! (
)
:>>
)
"-
$K
" &
8&
"
)
"
"
(
.
(
. "
"
)$K 2
) .
"
" 5
' 6
&
" &
& .
8
8
.
. )
"
% &
" +) %
$
.
&
!)
8
(
'
&
&
4 +
(
")
"
'
) $ KC
"
'
.
/
. -
System.Linq.Expressions/
public class Expression<TDelegado> { }
2
)
"
. %
" Expression$
$A ( 2
.0
"
.
.
%"
"
& . (
&
"
"
ParameterExpression px =
Expression.Parameter(typeof(int), "x");
Expression body = Expression.Equal(
Expression.Modulo(px, Expression.Constant(2, typeof(int))),
Expression.Constant(0, typeof(int)));
Expression<Func<int, bool>> esPar =
Expression.Lambda<Func<int, bool>>(body, px);
"
"
! "
'
)
!)
. /
+
8
%
!)
&
8
.
&
") $
!)
)"
"
"-
Compile (
)
8
(
&$
!"
:>:
# "
!
(
"
"
. %
. "
. " & &. $
" ) )
. %
"
2" " $
)
"
$
. ")- " %)
.
(
) $ KA
% (
" '
"
.
(
3
4
" "
. %
%
8&
(
# #
)
"
(
+
8
"
. "
&
&(
"! )
$C
5
.
"! "
+
"
#+
. "
O
"0
"
"
. %
"
%
.
&
)
"
. "
(
"
" &
. % "!
)%
#
)$
.
+"
T> $ "
9 " 2 #+
# " + "
V> JJ " '&
(
"
& +
(
"
" &
/
&
2"
$C
( #+ " '
&/ (
"! .
+ "!
" $
" .
O $
"!/
. "
- &"
( O
" "
. %
"! 8
" %
%"
.
$
6
. %
"
3
"
)
0
'
"
"
K &"
"
( 2 (
)+
(
$
.&
.0 "
.
1 F
#2
"
(
!.
B
+
O
&
"
+ " . ! (
. %
$
$G
K
( - .
"
&
(
3$
"
. " +
(
"
$
reflexin
.
"
. "
" # )
" &(
8
"0
JJ
3
V> @$
" ) Runtime Type Information 91 @
#
"
" &
)$
# "! 1
(
JJ
( #
. %
$
" % (
"
JJ$
%"
(
)
"-
)
8&
"
X/
+
.
/
"
$
(
/#
#
" +
% &
)
$
"
"
."
"
"
2
"
"
3
"
" "
")
$
&
&
#
+
" # "!
" &
"!(
" /"
. 8& $
&0
' :(
" $
& "
.
8&
$
8
(
"! ) %
+
%
"+ 2
0 "
. % $
8&
"
)
" "
&
" & )
( "
.
"
.
")"!
/ Reflection.Emit$
8&
. "
&
)
$
"&
& +
& . %
)$
")
")
&
")
"
atributos$
$
'"
8&
%"
)
" # "
"
5 " 6 + "
System.RuntimeType$ #
)
(
)" "
" ") #
System.Type$
A+
"
+ 8
&
& .$
"
(
) ,
.
)
"
/
")
)"
"
%
-
)
&
"-
System.Type
'"
&
B$
" .
class Program
{
static void Main(string args[])
{
System.Type t = typeof(Program);
Console.WriteLine(t.FullName);
}
}
FullName
Type
")
")
"
&
$
)!
ConsoleApplication1
Program
%"
"'#
"
)"
+(
"
GetType (
"-
Type
System.Object$ KF -
"
"
"
class Program
{
static void Main(string args[])
{
System.Type t = typeof(Program);
Console.WriteLine(t.FullName);
t = t.GetType();
Console.WriteLine(t.FullName);
}
}
454&
+ 3&+364/,+
,
;
"
&
&
.
"!
$
#
$
'(
"
)
System.Type
.
"
)
&
"
'(
/
:>I
"
"
"
&/
0 "
#
" " '
"
$
&
GetInterfaces
"
" 3
.2
"
.
/
. &
&
'
"
/$
0"
&
&
'
'
'#
'. -
")
0"
&
)
"
FullName$
")
"
Name
+
")
"
")
FullName + "
") Name
" + .
$
+1
."
'
"
$
- $
" $
8
+
" " (
(
SqlConnection ( #
.
made in Microsoft
2
+
SqlConnection
'(
"
#+
(
"
"
")
"2$
Cliente.SqlConnection
(
$
")
" '
'&
#
" +
)
" +"
&
(
.
)
&
"
""!(
"
"
$
(
" Assembly +
$
)
%"
Console.WriteLine(typeof(int).Assembly.FullName);
&
:>;
"
"
!
' ")$
System.Data.Sql-
") '
")!
8& ) 2 # )
")
.
System.Reflection$ A +
+
"
")
Assembly/
"
$
%"
6
SqlConnection 5
"
+"&
" "
"
$
")
"
'&
"
&0
' :(
5 &
3$'4'4'42
3
3 77 8 89":/; 4<:
display name
"
")
"
2"
.
#
")
/
.
5 &
"2
3
3"'4'4'42
"
'
")
( $
")
"
0)
'
&
3
$
"
"
+%
.0
"
")
mscorlib
!(
'<
!
*
"
") ")&
&$1
" "
4(
0 "
*+,-
")
Program
# )- "
& " !
"
$
$
#
" $
!
(
*
mscorlibA
")-
"
")
"-
Assembly/
public static Assembly GetExecutingAssembly();
public static Assembly GetCallingAssembly();
public static Assembly GetEntryAssembly();
" "" $
.
0 " "'
"
)
.
%
"
(
&$
Assembly
")
")
( % &
$* #
2
.
"
!"
"
""(
#
& "Main (
$
")
&
)
%
"
#
")
( +
#
.
")
"
plug-ins$
& 8
) "
"! Load
") /
") .
%"
")
" "
")
"
% "
")
(
(
"!(
.
!
2
'
" %
"!(
$
(
")
"
$G
(
. % 8
&
")
( +
&
)
")
1
+
")
&
. %/
:>S
KC
2
")
8
&
F
" " $
"
"
")-
LoadFrom
"
&
# + ")-
"
plug-in
& " +
$
F
!
" "
. plug-ins
&
/
"
")
& 2
Assembly
"
"
")
"-
LoadFrom
(
)
")
. (
8
KF -
"
"
# "
&$
#
")
")
"
"
"
&
"
$
.
"
")
)
")
"
(
Assembly, . "
" asm$
'
(
&
"
"
.
")
'
"
)%
!
D
"
" 2
"&
"
)"
(
"
&
(
."
IsPublic
"
ofuscar
GetTypes
(
E
(
N
"
")
&
#
& .
)%
.
"
.
%
%
'(
"
+
"
"
"!
"
"
)
&$
(
8&
" ")
# #
0 "
2(
)%
"
2"
(
& 8
) "
plug-ins$
(
+
$
%.
Biblioteca de clases$
"
"
.
:>?
" (
&$
+
+
(
(
2
+ !"
))
' 3
%
%
"
(
$
&
. 3
")
Ventanas/
7
"
M
BackColor
+ 3!
N Q "
"
))
"
8
&
& (
"
+
Aplicacin para Windows
& $ *!(
) &
% &
% ) .
" "
/
"
&
+
+
)
&0
' :(
" "
+
# .
Referencias
!. (
&
)$A+
+
$
) + %
!. +
"
-$
"
"
%
"! "
Load
" " +
.
/#
(
)
"
Agregar referencia
" 0
+
))
/
. "
"
(
"
")
Ventanas
)$
"
&/
"
#
"
Ventanas.dll$
"
#
! Combine
( #+ 8 "
" )" (
8
+
"-
"-
#
")
'(
*+,-
")
"
Path
)
#
&
8
!
"
+
."
LoadFrom$
!
Form2
#
Ventanas
Form1A
)
'
"
"
0)
")
IsSubclassOf &
"IsAssignableFrom
)% $
0) +
+ "
Form$
"
"
" "
$
# +(
"-
8
"-
#+
CrearVentana
( # "
'
"
0 "
:>
!U
)" (
$7"
"
#
0)
"
!"
)0 (
$ CrearVentana
)%
"-
System.Type/
public object InvokeMember(
string name, BindingFlags invokeAttr, Binder binder,
object target, object[] args);
InvokeMember
"
"
" &$
"
"
.
%
"
/ InvokeMember
"
"
"" $
(
.
" ")
")
"
(
8
.
"-
Instance
"
"" $
"
)
%
"
.
!"
"
+
Public ( 0)
In" "
&$
!"
8
# +(
.
.0 (
!" $
)% (
(
"
"
$ BindingFlags
2
$ CreateInstance
$R
+
& ( # "
$ "
.
$
"
Binder
"
" (
"
")
stance4 )
# +(
"
" ")
%
!
'& (
"
+
"
!"
InvokeMember
"
Esto es un objeto y no una pipa $
(
"
"
'(
"
$
#
"
$
2"
+
"
&
"
+
)"
"
" #
%
"
# ) "
)
"
InvokeMember
"
"-
(
Show$
&
CrearVentana
"CreateInstance
"
"
Assembly/
foreach (Type t in asm.GetTypes())
if (t.IsPublic && t.IsSubclassOf(typeof(Form)))
((Form)asm.CreateInstance(t.FullName)).Show();
%
"-
CreateInstance
"
8) (
)0 (
") +
InvokeMember$
'
%"
"
)"
")
2" (
! "
.
(
" 0
(
"
" 0
# +"
"
" +"
+
) " +
& . "
."
"
"
+
"
&
"
"
"
!
' ) /
'"
&
(
. $
"!
" &$
%"
&
(
! "
"
$ KF - 8
) 2"
(
"
8 antes
(
$
!
2
&
// Esto es Delphi:
property Edad: Integer read FEdad write SetEdad default 18;
:>T
'
#/
&0
' :(
(
!
'
# #
)
" &
$
"
.
!
'
# "
"
"
"
'
"
"
&
)
"
.
"
"
"
9+
#
!
'
$
Edad .
/
#
) (
4
"
$
)
"
&$
. "
%
"
#$A
")
Edad + #
) "
& @.
%
"
!
$
" "
")
") . /
!
& .
' &
"! "
$
"
)
'
FEdad
"
'
KF " &
" "
.(
! )%
(
.
"
$ &
"
8
"
" &
& .
.
"!
" +
en tiempo de ejecucin$
&
8 2 "
'
"
&
8
&.
" "
" &
" &
&
" &
&
# )$
. " &
. %
)$
A %) .
3& B + 2
!
ad hoc
&
" &
&"
"
8
" 3 ( -
. %
$
$ #
&
-
$
"!
B/
'
"
atributos$ 7 "
[DefaultValue(18)]
public int Edad
{
get { }
set { }
}
)
&
"
"
!"
)
& (
% &$
"&
+
&
"
&
")
%"
/
"
)
"& #
Obsolete
Attribute/
ObsoleteAttribute (
"
)
")
:>
.V
ObsoleteAttribute
0)
Attribute +
(
"
Persona
"
!"
Obsolete-
Persona/
34&/+*NQ)N9!(!
>
.
A>
!
%!:$.9(+$9.!
15
# +"
" "
Persona & # +
" +
" "!8" $
Persona
# +"
)
Edad +
KF - #
" #
Value
' &
"
8
)
)
#
Obsolete
+
"
Default-
$
" &
"
( %
& .
"
)
"
$
"
WebServiceAttribute (
)
$
&
"
$
"
"
+
Persona$
'
"
"
DefaultValue/
DefaultValueAttribute
"
"
M )
)
"
)
"
+
"
"-
[WebService(
Description="Mi servicio",
Namespace="http://intsight.com/")]
public class MiServicioWeb
{
}
WebService #
'
#
'
.2/ Description +Namespace
WebServiceAttribute
")
)
"
.
"
8
!"
*+,-
!"
"
)
") $
!"
$
/
%
)%
!"
"
'
.3
+
B
.
E
,
7
)
"
"
&
"
::>
%"
")
"
'$
(
"!
8 (
"
(
"
) 2 "
& 8
(
"
"
) "
"
(
"
"
plug-ins$ C
$
(
" 0
"
"
$
)"
"!
8
&
&"
/
&0
' :(
) 2"
8
"
"
")$
)
"
" 0(
7"
"
" "
8
& "
" $
+
" "
) + #
8 $ *
)
"
!
Ventanas/
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false)]
public class MenuItemAttribute : Attribute
{
private string menuText;
public MenuItemAttribute()
{
this.menuText = String.Empty;
}
public MenuItemAttribute(string menuText)
{
this.menuText = menuText ?? String.Empty;
}
public string MenuText
{
get { return menuText; }
set { menuText = value ?? String.Empty; }
}
}
454&
+ 3&+364/,+
E
/ 554 ,
#
" MenuItemAttribute
Attribute "
% +
)
"
"
(
#
System.Attribute$
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false)]
MenuItem &
&
0)
/
'
$
(
!
!"
(
9D
"
!"
'
8 +
E@+(
' " "!8" $ A +
+
(
)
!"
0) MenuText$
.
(
"
'"
$
"
- "
&
Ventanas
.
!"
' "
/
"
&
(
%
"
") $
)
"
"
[MenuItem("Primera ventana")]
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
# +(
(
7
"
"
(
(
#
"
%
.
"
:::
"
"
)
/
Inherited
& . (
" " $
"
)
)
"
" 0
AttributeUsage
$
)
#
2
' "
"
- $
"
#
"
"
&
$ &
"
* +"
/
. ) Ventanas$
"
)
#
"
"
"
"
miVentanas
# "
"
" "
)%
"
MenuStrip
"
". /
"Load
"
8
& + !) "
"
" 0
(
")
"
)
"
)
"
"
'$
(
" 0
.
" 0
$
"
2"
$
Form +(
MenuItem/
CrearMenu
8 .
' "
")
(
MenuItem$
. !
)
"
)
" 0
"
&
"
Type/
"-
&
.
)
.
"-
"
!"
(
(
)
"
)%
'
"
$
$
GetCustomAttributes
"
)
&
"
"
"
$
"
"
"
&
CrearMenu/
::=
"-
&0
' :(
"
"+
+ &
- " (
&
"
)
"-
&
(
"
. -
&
&
Object + MenuItemAttribute
" #
"
")
(
.
"
+
GetAttrs
&
"
).
CrearMenu #
$
$
" +
3 -
=$>
'
"
"
+
( # "
)%
"
"
"-
)
"
GetCustomAttributes
.0
Tag
)
)
"
"
Click
'"
CrearMenu
" 0
( "
"
"
. ) Ventanas$
"
!
"-
" 0
# "
item Click/
"&
CrearVentana
( 2
"+
item Click
#
"
% ".
+ "
"
(
$
" .
(
.0 "
&
)
" (
'
"
"
. "!
"
)
)
"
::I
AppDomain 7
Application
Idle 75
ThreadApplication 75
rboles de expresiones 100
Array 11
assembly Ver ensamblados
Assembly
clase 104
CreateInstance 108
GetTypes 106
Load 105
LoadFrom 106, 107
Type 104
AsyncCallback 59
atributos 108
base 28
BeginInvoke 58
BindingFlags 108
boxing 50
clases
componentes 60
parciales 67
CLR
boxing 50
constructores 28
vectores 11
Combine
Delegate 57
Path 107
constructor 28
esttico 31
operador new 25
struct 46
covarianza 82
CreateInstance 108
DataRow 63
DefaultValue 109
delegados 55, 96
cadenas de 56
expresiones lambda 98
mtodos annimos 96
Delegate
Combine 57
Dispose 73
EndInvoke 58
ensamblados 4
Equals
ValueType 48
EventArgs 65
EventHandler 65
eventos 65
expresiones
rboles de 100
lambda 98
foreach 91
Form
Load 107, 112
Show 108
Func 100
genericidad 76
inferencia de tipos 80, 99
mtodos genricos 80
restricciones 78
tipos anidados 83
GetCallingAssembly 105
GetCustomAttributes 112
GetEntryAssembly 105
GetExecutingAssembly 105
GetHashCode 48
GetTypes
Assembly 106
GetValueOrDefault 88
IAsyncResult 58
IComponent 60
IDisposable 73
Idle 75
IEnumerable 92
IEnumerator 92
indexadores 62
inicializacin
campos 29
clases 28
struct 46
inlining 4
interfaces 35
implementacin explcita 36
implementacin implcita 35
internal 27, 48
InvokeMember 108
IsAssignableFrom 107
IsPublic
Type 106
IsSubclassOf 107
iteracin 91
iteradores 93
iteradores cerrados 96
Load
Assembly 105
Form 107, 112
LoadFrom 106, 107
mtodos 25
annimos 96
de acceso 61, 63
de extensin 39
estticos 26, 28, 31
genricos 80
parciales 69
virtuales 30
Nullable 86
GetValueOrDefault 88
HasValue 87
Value 87
ObsoleteAttribute 109
operador
de fusin 88
promovido 89
partial 67, 69
Path
Combine 107
private 27, 48
propiedades 61
automticas 64
indexadores 62
valor por omisin 109
protected 27
public 27, 48
::?
restricciones
desnudas 81
Show 108
static 26
struct 43
constructores 46
ThreadException 75
tipos
anidados 83
anulables 85
de interfaz Ver interfaces
genricos 76
inferencia de 80, 99
ToString 9, 49
Type 103
Assembly 104
GetCustomAttributes 112
InvokeMember 108
IsAssignableFrom 107
IsPublic 106
IsSubclassOf 107
unboxing 51
using
instruccin 73
ValueType 47, 51
Equals 48
visibilidad 27
WaitOne 58
Intuitive C#
Copyright 2004-2008, by Ian Marteens
Prohibida la reproduccin total o parcial de esta obra,
por cualquier medio, sin autorizacin escrita del autor.
Madrid, Espaa, 2008