示例#1
0
        public static void Main(string[] args)
        {
            PointRef pr  = null; //new PointRef(2,3);
            PointRef pr1 = new PointRef(5, 3);
            PointRef pr2 = pr.Add(pr1);

            PointValue pv  = new PointValue(4, 5);
            PointValue pv1 = new PointValue(5, 3);
            PointValue pv2 = pv.Add(pv1);
        }
 public PointValue Add(PointValue p)
 {
     return(new PointValue(this.X + p.X, this.Y + p.Y));
 }