using System;
interface Interfaz {
void Metodo();
}
struct S : Interfaz
{
public void Metodo()
{
Console.WriteLine("OK");
}
}
public class Test
{
public static void Main()
{
S s1 = new S();
Interfaz s2 = new S();
Interfaz i1 = s2;
S s3 = (S)i1; // Unboxing
Interfaz i2 = s3; // Boxing
i1.Metodo();
s2.Metodo();
}
}
dXNpbmcgU3lzdGVtOwoKaW50ZXJmYWNlIEludGVyZmF6IHsKCXZvaWQgTWV0b2RvKCk7Cn0KCnN0cnVjdCBTIDogSW50ZXJmYXoKewoJcHVibGljIHZvaWQgTWV0b2RvKCkKCXsKCQlDb25zb2xlLldyaXRlTGluZSgiT0siKTsKCX0KfQoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJICAgIFMgczEgPSBuZXcgUygpOwoJICAgIEludGVyZmF6IHMyID0gbmV3IFMoKTsKCSAgICAKCSAgICBJbnRlcmZheiBpMSA9IHMyOwoJCgkgICAgUyBzMyA9IChTKWkxOyAgIC8vIFVuYm94aW5nCgkKCSAgICBJbnRlcmZheiBpMiA9IHMzOyAgICAgIC8vIEJveGluZwoJCgkgICAgaTEuTWV0b2RvKCk7CgkgICAgczIuTWV0b2RvKCk7Cgl9Cn0=