Xojo.Core.Size.Compare

From Xojo Documentation

Revision as of 17:45, 11 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
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