public static void Main()
var rozhraniPole = new ITest[]
new TestImplementation(),
new SecondImplementation()
ITest interfaceTest = new TestImplementation();
interfaceTest.MyMethod();
Console.WriteLine("Volam ruzne implementace podle rozhrani:");
foreach (var rozhrani in rozhraniPole)
public static void DoStuff(ITest worker)
public class TestImplementation : ITest
public void MyPublicMethod() {
public class SecondImplementation : ITest
Console.WriteLine("Hah, jsem druhý");