แก้ไข

แชร์ผ่าน


RectangleF.Implicit(Rectangle to RectangleF) Operator

Definition

Converts the specified Rectangle structure to a RectangleF structure.

public:
 static operator System::Drawing::RectangleF(System::Drawing::Rectangle r);
public static implicit operator System.Drawing.RectangleF (System.Drawing.Rectangle r);
static member op_Implicit : System.Drawing.Rectangle -> System.Drawing.RectangleF
Public Shared Widening Operator CType (r As Rectangle) As RectangleF

Parameters

r
Rectangle

The Rectangle structure to convert.

Returns

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

Examples

The following code example demonstrates how to use the Implicit, 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

Applies to