Rect and Rectangle: how to remember which one is which?


Each time I’m dealing with bounds, I hesitate between the Rect and Rectangle type (because they look like synonyms to me and differentiating them is somehow hard). I usually have to start with one (I pick one randomly) until I find either I chose the wrong one (e.g. it doesn’t contain the Intersects method) or I luckily chose the right one.

Is there a mnemonic way to differentiate them in memory for good, without guessing each time?

Yeah, never use “Rectangle”, it’s a left over from the 90s.

It might be considered confusing that in Graphics.Methods.

The following are deprecated

Replaced by

So here Rectangle has replaced Rect to make things clearer in the names of methods.

But Rect survives as the name of the class.

how about a tattoo or sticky notes (also as desktop app)?
in ide notes are also useful.
quickinfo should also tell which argument (class) is needed.

Thanks for your replies.

I’ll try to remember this. As Robert says, it’s confusing they have done the opposite with graphics (from Rect to Rectangle).
So… “Rect” for datatype and “Rectangle” for graphics.

Indeed. You’ve pointed out why I can’t forget “rectangle” at all in Xojo.

In my experience, I’ve put a lot of notes these last 20 years, all around in my computer, but it’s faster and more reliable to use personal memory than to recall in which app or where I’ve put them (OneNote, Apple’s Notes, regular files [in my “Programming” folder or elsewhere, etc.…). Frustrating to take time to take notes and then forget where they are; especially with more than 20 years of using computers: apps have changed, as has my personal “organisation”.
And probably won’t ever take physical notes (on paper, etc.) because it can be mislaid as well and also wastes paper.