Пример #1
0
        /// <summary>
        /// ii. string - (NumeroBinario, NumeroDecimal
        /// </summary>
        /// <param name="nb"></param>
        /// <param name="nd"></param>
        /// <returns></returns>
        public static string operator -(NumeroBinario nb, NumeroDecimal nd)
        {
            NumeroDecimal nd1           = (NumeroDecimal)nb;
            NumeroBinario numeroBinario = (NumeroBinario)(NumeroDecimal)(nd1 - nd);

            return((string)numeroBinario);
        }
Пример #2
0
        public static bool operator !=(NumeroDecimal nd, NumeroBinario nb)
        {
            NumeroDecimal nd1 = (NumeroDecimal)nb;

            return(nd.numero != nd1.numero);
        }
Пример #3
0
        public static double operator -(NumeroDecimal nd, NumeroBinario nb)
        {
            NumeroDecimal nd1 = (NumeroDecimal)nb;

            return(nd1 - nd);
        }