概述 Annotations (Metadata) - This language feature lets you avoid writing boilerplate code under many circumstances by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the pr
一,类继承接口 1,首先我们定义一个简单的ITeacher接口,并定义一个Professor类继承它. public interface ITeacher { void Print(); } public class Professor : ITeacher { public void Print() { Debug.Write("I'm Professor!"); } } 然后用接口变量调用如下: ITeacher teacher = new Professor(); teacher