Last active
August 9, 2016 01:56
-
-
Save zhenlinyang/b2b2c064b6658a885e440e1494cb691c to your computer and use it in GitHub Desktop.
HexString & Ulong Converter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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