예제 #1
0
        public static ulong FromString(string idString)
        {
            var idBytes = Safe64Encoding.DecodeBytes(idString);

            if (BitConverter.IsLittleEndian)
            {
                Array.Reverse(idBytes);
            }

            var id = BitConverter.ToUInt64(idBytes, 0);

            return(id);
        }
예제 #2
0
        public static string ToString(ulong id)
        {
            var idBytes = BitConverter.GetBytes(id);

            if (BitConverter.IsLittleEndian)
            {
                Array.Reverse(idBytes);
            }

            var idString = Safe64Encoding.EncodeBytes(idBytes);

            return(idString);
        }