Xojo.Core.Size.Compare

From Xojo Documentation

Method

Xojo.Core.Size.Operator_Compare(rhs As Xojo.Core.Size) As Integer

Supported for all project types and targets.

You can use the comparison operators (>, <, =, >=, <=, <>) to compare sizes to one another. The comparison is done first by Width and then by Height.

Sample Code

Compare two sizes:

Var s1 As New Xojo.Core.Size(100, 100)
Var s2 As New Xojo.Core.Size(50, 50)

If s1 > s2 Then
// True, because s1.Width > s2.Width
End If