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();
}
}
}
dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFydGljdWxvcy5DYXAwNAp7CglpbnRlcm5hbCBjbGFzcyBBcGxpY2FjaW9uCgl7CgkJLy8gRGVsZWdhZG8gZXh0ZXJpb3I6CgkJaW50ZXJuYWwgZGVsZWdhdGUgdm9pZCBEZWxlZ2Fkb0V4dGVyaW9yKCk7CgkJCgkJLy8gRGVsZWdhZG8gaW50ZXJpb3I6CgkJaW50ZXJuYWwgZGVsZWdhdGUgdm9pZCBEZWxlZ2Fkb0ludGVyaW9yKCk7CgkJCgkJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJCXsKCQkJQ29uc29sZS5Xcml0ZUxpbmUoKTsKCQkKCQkJRGVsZWdhZG9FeHRlcmlvciBkZSA9IGRlbGVnYXRlKCkKCQkJewoJCQkJQ29uc29sZS5Xcml0ZUxpbmUoIkRlbGVnYWRvIEV4dGVyaW9yIik7CgkJCQkKCQkJCURlbGVnYWRvSW50ZXJpb3IgZGkgPSBkZWxlZ2F0ZSgpCgkJCQl7CgkJCQkJQ29uc29sZS5Xcml0ZUxpbmUoIkRlbGVnYWRvIEludGVyaW9yIik7CgkJCQl9OwoJCQkJCgkJCQlkaSgpOwoJCQl9OwoJCQkKCQkJZGUoKTsKCQkJCgkJCUNvbnNvbGUuV3JpdGVMaW5lKCk7CgkJfQoJfQp9