C#Interface 接口(二)
using System; public class { public static void Main() { IWuDang d = getWuDang(); d.sing(); } public IWuDang getWuDang() { return new A(); } } public interface IWuDang { void sing(); } public class A:IWuDang { public void sing() { Console.WriteLine("sss"); } }