# RectangleFRectangleFRectangleFRectangleF Struct

## Definition

Stores a set of four floating-point numbers that represent the location and size of a rectangle. For more advanced region functions, use a Region object.

``public value class RectangleF : IEquatable<System::Drawing::RectangleF>``
``````[System.Serializable]
public struct RectangleF : IEquatable<System.Drawing.RectangleF>``````
``type RectangleF = struct``
``````Public Structure RectangleF
Implements IEquatable(Of RectangleF)``````
Inheritance
RectangleFRectangleFRectangleFRectangleF
Attributes
Implements

## Remarks

A rectangle is defined by its width, height, and upper-left corner.

## Constructors

 RectangleF(PointF, SizeF) RectangleF(PointF, SizeF) RectangleF(PointF, SizeF) RectangleF(PointF, SizeF) Initializes a new instance of the RectangleF class with the specified location and size. RectangleF(Single, Single, Single, Single) RectangleF(Single, Single, Single, Single) RectangleF(Single, Single, Single, Single) RectangleF(Single, Single, Single, Single) Initializes a new instance of the RectangleF class with the specified location and size.

## Fields

 Empty Empty Empty Empty Represents an instance of the RectangleF class with its members uninitialized.

## Properties

 Bottom Bottom Bottom Bottom Gets the y-coordinate that is the sum of Y and Height of this RectangleF structure. Height Height Height Height Gets or sets the height of this RectangleF structure. IsEmpty IsEmpty IsEmpty IsEmpty Gets a value that indicates whether the Width or Height property of this RectangleF has a value of zero. Left Left Left Left Gets the x-coordinate of the left edge of this RectangleF structure. Location Location Location Location Gets or sets the coordinates of the upper-left corner of this RectangleF structure. Right Right Right Right Gets the x-coordinate that is the sum of X and Width of this RectangleF structure. Size Size Size Size Gets or sets the size of this RectangleF. Top Top Top Top Gets the y-coordinate of the top edge of this RectangleF structure. Width Width Width Width Gets or sets the width of this RectangleF structure. X X X X Gets or sets the x-coordinate of the upper-left corner of this RectangleF structure. Y Y Y Y Gets or sets the y-coordinate of the upper-left corner of this RectangleF structure.

## Methods

 Contains(PointF) Contains(PointF) Contains(PointF) Contains(PointF) Determines if the specified point is contained within this RectangleF structure. Contains(RectangleF) Contains(RectangleF) Contains(RectangleF) Contains(RectangleF) Determines if the rectangular region represented by `rect` is entirely contained within this RectangleF structure. Contains(Single, Single) Contains(Single, Single) Contains(Single, Single) Contains(Single, Single) Determines if the specified point is contained within this RectangleF structure. Equals(RectangleF) Equals(RectangleF) Equals(RectangleF) Equals(RectangleF) Equals(Object) Equals(Object) Equals(Object) Equals(Object) Tests whether `obj` is a RectangleF with the same location and size of this RectangleF. FromLTRB(Single, Single, Single, Single) FromLTRB(Single, Single, Single, Single) FromLTRB(Single, Single, Single, Single) FromLTRB(Single, Single, Single, Single) Creates a RectangleF structure with upper-left corner and lower-right corner at the specified locations. GetHashCode() GetHashCode() GetHashCode() GetHashCode() Gets the hash code for this RectangleF structure. For information about the use of hash codes, see `Object.GetHashCode`. Inflate(SizeF) Inflate(SizeF) Inflate(SizeF) Inflate(SizeF) Enlarges this RectangleF by the specified amount. Inflate(Single, Single) Inflate(Single, Single) Inflate(Single, Single) Inflate(Single, Single) Enlarges this RectangleF structure by the specified amount. Inflate(RectangleF, Single, Single) Inflate(RectangleF, Single, Single) Inflate(RectangleF, Single, Single) Inflate(RectangleF, Single, Single) Creates and returns an enlarged copy of the specified RectangleF structure. The copy is enlarged by the specified amount and the original rectangle remains unmodified. Intersect(RectangleF, RectangleF) Intersect(RectangleF, RectangleF) Intersect(RectangleF, RectangleF) Intersect(RectangleF, RectangleF) Returns a RectangleF structure that represents the intersection of two rectangles. If there is no intersection, and empty RectangleF is returned. Intersect(RectangleF) Intersect(RectangleF) Intersect(RectangleF) Intersect(RectangleF) Replaces this RectangleF structure with the intersection of itself and the specified RectangleF structure. IntersectsWith(RectangleF) IntersectsWith(RectangleF) IntersectsWith(RectangleF) IntersectsWith(RectangleF) Determines if this rectangle intersects with `rect`. Offset(PointF) Offset(PointF) Offset(PointF) Offset(PointF) Adjusts the location of this rectangle by the specified amount. Offset(Single, Single) Offset(Single, Single) Offset(Single, Single) Offset(Single, Single) Adjusts the location of this rectangle by the specified amount. ToString() ToString() ToString() ToString() Converts the `Location` and Size of this RectangleF to a human-readable string. Union(RectangleF, RectangleF) Union(RectangleF, RectangleF) Union(RectangleF, RectangleF) Union(RectangleF, RectangleF) Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.

## Operators

 Equality(RectangleF, RectangleF) Equality(RectangleF, RectangleF) Equality(RectangleF, RectangleF) Equality(RectangleF, RectangleF) Tests whether two RectangleF structures have equal location and size. Implicit(Rectangle to RectangleF) Implicit(Rectangle to RectangleF) Implicit(Rectangle to RectangleF) Implicit(Rectangle to RectangleF) Converts the specified Rectangle structure to a RectangleF structure. Inequality(RectangleF, RectangleF) Inequality(RectangleF, RectangleF) Inequality(RectangleF, RectangleF) Inequality(RectangleF, RectangleF) Tests whether two RectangleF structures differ in location or size.