using System;
using System.Drawing;
using System.Windows.Forms;
class PaintHello
{
public static void Main()
{
Size sz = new Size(12, 12);
Point pt = new Point(20, 20);
pt = pt+sz;
MessageBox.Show("Addition :"+ pt.ToString());
pt = pt-sz;
MessageBox.Show("Subtraction :"+ pt.ToString());
PointF ptf = pt;
MessageBox.Show("PointF :"+ pt.ToString());
sz = (Size)pt;
MessageBox.Show("Size :"+ sz.Width.ToString() +","+ sz.Height.ToString() );
}
}
|