O
Olivier Gaumond
I think the following overload of Color.FromArgb should have a uint
parameter instead of int.
----
From MSDN:
Creates a Color structure from a 32-bit ARGB value.
public static Color FromArgb(
int argb
);
Parameters
argb
A value specifying the 32-bit ARGB value.
----
What if I want to get a color without an alpha component, I would have
to make this call for green.
Color color = Color.FromArgb(0xFF00FF00);
However 0xFF00FF00 is greater than Int32.MaxValue then I get an
OverflowException et runtime or a compile time error (Argument '1':
cannot convert form 'uint' to 'int')
I know I can use another overload but I still think the API is
incorrect.
Any workaround around this?
Olivier
parameter instead of int.
----
From MSDN:
Creates a Color structure from a 32-bit ARGB value.
public static Color FromArgb(
int argb
);
Parameters
argb
A value specifying the 32-bit ARGB value.
----
What if I want to get a color without an alpha component, I would have
to make this call for green.
Color color = Color.FromArgb(0xFF00FF00);
However 0xFF00FF00 is greater than Int32.MaxValue then I get an
OverflowException et runtime or a compile time error (Argument '1':
cannot convert form 'uint' to 'int')
I know I can use another overload but I still think the API is
incorrect.
Any workaround around this?
Olivier