publicstringDate { get { returndate; } } publicstringProgrammer { get { returnprogrammer; } } //专有成员数据 privateintbugID; privatestringcomment; privatestringdate; privatestringprogrammer; } //把属性指派给类 [BugFixAttribute(121,"JesseLiberty","01/03/05")] [BugFixAttribute(107,"JesseLiberty","01/04/05", Comment="Fixedoffbyoneerrors")] publicclassMyMath { publicdoubleDoFunc1(doubleparam1) { returnparam1+DoFunc2(param1); } publicdoubleDoFunc2(doubleparam1) { returnparam1/3; } } publicclassTester { publicstaticvoidMain() { MyMathmm=newMyMath(); Console.WriteLine("CallingDoFunc(7).Result:{0}", mm.DoFunc1(7)); } } |