using System;
namespace Articulos.Cap04
{
public delegate void Delegado1();
public delegate void Delegado2();
public class Aplicacion
{
public static void Main()
{
Delegado1 d1 = Metodo;
// GenerarĂ¡ el error CS0029:
// Cannot implicitly convert type...:
Delegado2 d2 = d1;
}
public static void Metodo()
{
Console.WriteLine("Metodo");
}
}
}
dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFydGljdWxvcy5DYXAwNAp7CiAgICBwdWJsaWMgZGVsZWdhdGUgdm9pZCBEZWxlZ2FkbzEoKTsKICAgIHB1YmxpYyBkZWxlZ2F0ZSB2b2lkIERlbGVnYWRvMigpOwogICAgCiAgICBwdWJsaWMgY2xhc3MgQXBsaWNhY2lvbgogICAgewogICAgICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKICAgICAgICB7CiAgICAgICAgICAgIERlbGVnYWRvMSBkMSA9IE1ldG9kbzsKICAgICAgICAgICAgLy8gR2VuZXJhcsOhIGVsIGVycm9yIENTMDAyOToKICAgICAgICAgICAgLy8gQ2Fubm90IGltcGxpY2l0bHkgY29udmVydCB0eXBlLi4uOgogICAgICAgICAgICBEZWxlZ2FkbzIgZDIgPSBkMTsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgcHVibGljIHN0YXRpYyB2b2lkIE1ldG9kbygpCiAgICAgICAgewogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSgiTWV0b2RvIik7CiAgICAgICAgfQogICAgfQp9
prog.cs(15,23): error CS0029: Cannot implicitly convert type `Articulos.Cap04.Delegado1' to `Articulos.Cap04.Delegado2'
Compilation failed: 1 error(s), 0 warnings