using system ; delegate int mydelegate( ) ; class b { // 定义一个私有的函数: static int myprivatemethod() { return 0 ; } } public class a { // 字段定义: public b myfield = new b();// 错误: 类型b与a字段a.myfield级别不同 // 构造函数: public readonly b myconst = new b(); //错误: 类型b是仅读的 //方法: public b mymethod() { return new b(); } //属性: public b myprop { set { } } public static b operator + (a m1, b m2) { return new b(); } static void main() { console.write("compiled successfully"); } }