Skip to content

Instantly share code, notes, and snippets.

@zhenlinyang
Last active August 9, 2016 01:56
Show Gist options
  • Save zhenlinyang/b2b2c064b6658a885e440e1494cb691c to your computer and use it in GitHub Desktop.
Save zhenlinyang/b2b2c064b6658a885e440e1494cb691c to your computer and use it in GitHub Desktop.
HexString & Ulong Converter
public static ulong HexStringToUlong(this string str)
{
return ulong.Parse(str, System.Globalization.NumberStyles.HexNumber);
}
[NotNull]
public static string UlongToHexString(this ulong num)
{
return string.Format("{0:x}", num);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment