ColorExtensionToColorUint Method |
[This is preliminary documentation and is subject to change.]
Converts a HTML color string (eg. #00FF00) into an ARGB uint
Namespace:
CSInfrastructure.Extensions
Assembly:
CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax public static uint ToColorUint(
this string colorString
)
Parameters
- colorString
- Type: SystemString
The color string to parse
Return Value
Type:
UInt32An ARGB uint
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Exception | Condition |
---|
ArgumentNullException | Thrown when colorString is NULL |
ArgumentException | Thrown when colorString is whitespace only |
ArgumentException | Thrown when colorString does not start with # |
See Also