C#入门之重载
摘要:
重载using System;class Vector{private double XVector;private double YVector;//构造函数public Vector(double x, double y ){XVector = x;YVector = y;}//获取向量的长度public double GetLength( ){double Length = Math.Sqrt( XVector*XVector + YVector*YVector );return Length;}//重载运算符==public static bool operator == ( Vect 阅读全文
posted @ 2012-03-16 09:54 zhangtao1212 阅读(353) 评论(0) 推荐(0) 编辑