blob: 6a0f083c2c1c0a3f79ba902ada9c32c8a8db0661 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System;
class Test {
public static int Main() {
Console.WriteLine("test");
TestClass tst = new TestClass();
tst.test("test");
TestInterface ti = (TestInterface)tst;
ti.test("test");
return 0;
}
public interface TestInterface {
string test(string name);
}
public class TestClass: TestInterface {
public string test(string name) {
Console.WriteLine("test2");
return name + " testar";
}
}
}
|