示例#1
0
        public static Tempera operator +(Tempera t1, Tempera t2)
        {
            Tempera t3 = new Tempera(t1._color, t1._marca, t1._cantidad);

            if (t1 == t2)
            {
                t3._cantidad += t2._cantidad;
            }

            return(t3);
        }
示例#2
0
        private int ObtenerIndice(Tempera t)
        {
            int i;
            int indice = -1;

            for (i = 0; i < this._cantMaximaElementos; i++)
            {
                if (!(Object.Equals(this._colores[i], null)) && this._colores[i] == t)
                {
                    indice = i;
                }
            }

            return(indice);
        }