Sitecore 5.1.1 API

MainUtil.HexToInt Method 

[Visual Basic]
Public Shared Function HexToInt( _
   ByVal hex As String, _
   ByVal defaultValue As Integer _
) As Integer
[C#]
public static int HexToInt(
   string hex,
   int defaultValue
);

Remarks

This method converts a hexvalues string as 80FF into a integer. Note that you may not put a '#' at the beginning of string! There is not much error checking in this method. If the string does not represent a valid hexadecimal value it returns 0.

See Also

MainUtil Class | Sitecore Namespace