using System; using System.Collections.Generic; public interface IHuman { void Speak(); } public class Japanese : IHuman { public void Speak() { System.Console.WriteLine("私は日本人です。"); } } public class European : IHuman { public void Speak() { System.Console.WriteLine("I am European."); } } public class Program { public static void Main() { List<IHuman> humans = new List<IHuman> { new Japanese(), new European() }; humans.ForEach(x => x.Speak()); } }