a few months ago I wrote this code because it was the only way I could think to do it(while learning C#), well. How would you do it? Is unchecked
the proper way of doing this?
unchecked //FromArgb takes a 32 bit value, though says it's signed. Which colors shouldn't be.
{
_EditControl.BackColor = System.Drawing.Color.FromArgb((int)0xFFCCCCCC);
}
It takes a signed int b/c this dates back to the time when VB.NET didn't have unsigned values. So in order to maintain compatibility between C# and VB.NET, all the BCL libraries utilize signed values, even if it does not make logical sense.
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