C#:重载运算符
摘要:
CLR 支持在类型中,通过使用operator定义静态成员函数来重载运算符,让开发人员可以像内置基元类型一样使用该类型。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Sum { public int Num { get; set; } //重载运算符 //先写关键词public和static,operator关键词,操作符 public sta... 阅读全文
posted @ 2013-08-01 21:59 Alvin-x 阅读(209) 评论(0) 推荐(0)