RectangleF Implicit Conversion (Rectangle to RectangleF)

 

Converts the specified Rectangle structure to a RectangleF structure.

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

public:
static operator RectangleF (
	Rectangle r
)

Parameters

r
Type: System.Drawing::Rectangle

The Rectangle structure to convert.

Return Value

Type: System.Drawing::RectangleF

The RectangleF structure that is converted from the specified Rectangle structure.

The following code example demonstrates how to use the Implicit(Rectangle to RectangleF), RectangleFand Equality members. This example is designed for use with a Windows Form. Paste this code into a form and call the ConvertRectangleToRectangleF method when handling the form's Paint event, passing e as PaintEventArgs.

System.Drawing.RectanglesAndPoints#6

.NET Framework
Available since 1.1
Return to top
Show: