TheChaseMan's Frenetic SoapBox

Always looking for better ways to do things...

Int32.Parse and Hex

It's so fun to discover new, simple things in the .NET Framework that make your life easier. Did you know you can call Int32.Parse on a string that contains a hex value and it will convert to decimal for you? If you did, I'm sure I won't be the last person to find this and think it is pretty darn cool.   :-)

int x = System.Int32.Parse("A", NumberStyles.AllowHexSpecifier);

Console.WriteLine(x);


Digg!

posted on Wednesday, May 17, 2006 12:34 PM

Feedback

No comments posted yet.