Ken Brubaker

The ClavèCoder

<January 2009>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567


Navigation

Subscriptions

News

Kenneth Brubaker
Senior Application Architect

Locations of visitors to this page

Post Categories



Monday, August 23, 2004 - Posts

KB on hex string to Int32

This MSDN KB article gives an example of converting a hexadecimal string to an Int32. The new one for me was the use of NumberStyles.AllowHexSpecifier. You thought that it means you could expect the "0x" specifier (if your a c#'ee). You would be wrong:

AllowHexSpecifier

Supported by the .NET Compact Framework.

Indicates that the numeric string represents a hexadecimal value. Valid hexadecimal values include the numeric digits 0-9 and the hexadecimal digits A-F and a-f. Hexadecimal values can be left-padded with zeros. Strings parsed using this style are not permitted to be prefixed with "0x".

 

posted Monday, August 23, 2004 7:58 AM by kenbrubaker with 0 Comments




Powered by Dot Net Junkies, by Telligent Systems