Easy Hex handling in .NET


This is kind of trivial, but cool anyway. Someone just emailed me this snippet of code to read hexadecimal numbers:

int i = int.Parse("1FF", Globalization.NumberStyles.HexNumber))





Comments (1)
  1. Phil Weber says:

    Hmm… I think I prefer the VB syntax:

    I = Val("&H1FF")


Comments are closed.

Skip to main content