public UnitTypedSize ConvertTo(UnitType destinationType) { double size = this.Size; if (this.Units != destinationType) { switch (destinationType) { case UnitType.Points: size = UnitTypedSize.ConvertPixelToPoint(this.Size); break; case UnitType.Pixels: size = UnitTypedSize.ConvertPointToPixel(this.Size); break; } } return(new UnitTypedSize(size, destinationType)); }