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"); } }