public override bool Equals(object obj) { if (!(obj is SizeD)) { return(false); } SizeD comp = (SizeD)obj; return((comp.width == this.width) && (comp.height == this.height)); }
public static SizeD Sub(SizeD s1, SizeD s2) { return(new SizeD(s1.Width - s2.Width, s1.Height - s2.Height)); }
public static SizeD operator -(SizeD s1, SizeD s2) { return(SizeD.Sub(s1, s2)); }
public static SizeD Add(SizeD s1, SizeD s2) { return(new SizeD(s1.Width + s2.Width, s1.Height + s2.Height)); }
public static SizeD operator +(SizeD s1, SizeD s2) { return(SizeD.Add(s1, s2)); }