예제 #1
0
        public static uint Parse(string s)
        {
            UInt64 result = GeneralIntegerImplByUInt64.ParseUnsignedInteger(s);

            if (result > uint.MaxValue)
            {
                throw new OverflowException();
            }

            return((uint)result);
        }
예제 #2
0
        public static sbyte Parse(string s)
        {
            Int64 result = GeneralIntegerImplByUInt64.ParseSignedInteger(s);

            if (result > sbyte.MaxValue || result < sbyte.MinValue)
            {
                throw new OverflowException();
            }

            return((sbyte)result);
        }
예제 #3
0
        public static string ToString(ref int aThis)
        {
            bool bNegative = false;

            int aValue = aThis;

            if (aValue < 0)
            {
                bNegative = true;
                aValue   *= -1;
            }

            return(GeneralIntegerImplByUInt64.ToString((UInt64)aValue, bNegative));
        }
예제 #4
0
        public static string ToString(ref byte aThis)
        {
            byte aValue = aThis;

            return(GeneralIntegerImplByUInt64.ToString((UInt64)aValue, false));
        }