Size::Subtract Method (Size, Size)

 

Subtracts the width and height of one Size structure from the width and height of another Size structure.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public:
static Size Subtract(
	Size sz1,
	Size sz2
)

Parameters

sz1
Type: System.Drawing::Size

The Size structure on the left side of the subtraction operator.

sz2
Type: System.Drawing::Size

The Size structure on the right side of the subtraction operator.

Return Value

Type: System.Drawing::Size

A Size structure that is a result of the subtraction operation.

The following code example demonstrates how to use the Subtract method. To run this example, paste it into a Windows Form. Handle the form’s Paint event and call the SubtractSizes method from the Paint event-handling method, passing e as PaintEventArgs.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: