Created
May 30, 2014 20:49
-
-
Save Fhernd/790d1b8db1d2a603ccb6 to your computer and use it in GitHub Desktop.
Demostración de la declaración de un método anónimo dentro de otro en C#.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Articulos.Cap04 | |
{ | |
internal class Aplicacion | |
{ | |
// Delegado exterior: | |
internal delegate void DelegadoExterior(); | |
// Delegado interior: | |
internal delegate void DelegadoInterior(); | |
public static void Main() | |
{ | |
Console.WriteLine(); | |
DelegadoExterior de = delegate() | |
{ | |
Console.WriteLine("Delegado Exterior"); | |
DelegadoInterior di = delegate() | |
{ | |
Console.WriteLine("Delegado Interior"); | |
}; | |
di(); | |
}; | |
de(); | |
Console.WriteLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment