using System;
public interface MyInterface<T>
{
string GetData();
}
public class MyClass<T> : MyInterface<T>
{
private T _t;
public string GetData() { return "MyClass.GetData"; }
string MyInterface<T>.GetData() { return "MyInterface.GetData"; }
}
public class Test
{
public static void Main()
{
var x = new MyClass<int>();
MyInterface<int> y = x;
Console.WriteLine(x.GetData());
Console.WriteLine(y.GetData());
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGludGVyZmFjZSBNeUludGVyZmFjZTxUPgp7CiAgIHN0cmluZyBHZXREYXRhKCk7Cn0KcHVibGljIGNsYXNzIE15Q2xhc3M8VD4gOiBNeUludGVyZmFjZTxUPgp7CiAgICBwcml2YXRlIFQgX3Q7CiAgICBwdWJsaWMgc3RyaW5nIEdldERhdGEoKSB7IHJldHVybiAiTXlDbGFzcy5HZXREYXRhIjsgfQogICAgc3RyaW5nIE15SW50ZXJmYWNlPFQ+LkdldERhdGEoKSB7IHJldHVybiAiTXlJbnRlcmZhY2UuR2V0RGF0YSI7IH0KfQoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCXZhciB4ID0gbmV3IE15Q2xhc3M8aW50PigpOwoJCU15SW50ZXJmYWNlPGludD4geSA9IHg7CgkJQ29uc29sZS5Xcml0ZUxpbmUoeC5HZXREYXRhKCkpOwoJCUNvbnNvbGUuV3JpdGVMaW5lKHkuR2V0RGF0YSgpKTsKCX0KfQ==