This documentation is archived and is not being maintained.

Size.ToString Method

Updated: July 2009

Returns a String that represents this Size object.

Namespace:  System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public override string ToString()
You cannot use methods in XAML.

Return Value

Type: System.String
A String that specifies the width followed by the height.

If the Width property is set to 30 and the Height property is set to 40, the ToString method returns a string that says "30, 40".

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Date

History

Reason

July 2009

Added description about the string that is returned.

Customer feedback.

Show: