Rectangle.ToString Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Converts the attributes of this Rectangle to a human-readable string.

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

public override string ToString()

Return Value

Type: System.String

A string that contains the position, width, and height of this Rectangle structure ¾ for example, {X=20, Y=20, Width=100, Height=50}

.NET Framework
Available since 1.1
Return to top