Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created May 30, 2014 20:49
Show Gist options
  • Save Fhernd/790d1b8db1d2a603ccb6 to your computer and use it in GitHub Desktop.
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#.
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