I see that the System.Drawing.Rectangle class has two sets of properties:
X, Y, Width, HeightLeft, Top, Right, BottomThe difference between Width and Right are obvious. But I don't understand the reasoning behind the Left and Top properties.
Can these be used interchangeably along with X and Y, or am I missing something obvious? Is there a convention for when I should use which?
Left is purely a wrapper around the X property.
The same goes for Top / Y.
As noted by hakononakani, they are both readonly - in order to set the properties you need to use X and Y.
Left only gets the x-coordinate. However, X gets or sets the x-coordinate.
Same applies to Top and Y.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With