Exemple #1
0
        internal static sbyte MulOvf(sbyte x, sbyte y)
        {
            int z = Int32.MulOvf(x, y);

            if (z > sbyte.MaxValue || z < sbyte.MinValue)
            {
                throw new OverflowException();
            }
            return((sbyte)z);
        }
Exemple #2
0
        internal static short MulOvf(short x, short y)
        {
            int z = Int32.MulOvf(x, y);

            if (z > short.MaxValue || z < short.MinValue)
            {
                throw new OverflowException();
            }
            return((short)z);
        }