예제 #1
0
        public override bool Equals(object obj)
        {
            Numeracion newObj = obj as Numeracion;

            if (newObj == null)
            {
                return(false);
            }
            else
            {
                return(numeroCorrelativo.Equals(newObj.numeroCorrelativo));
            }
        }
예제 #2
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            Numeracion newObj = obj as Numeracion;

            if (newObj != null)
            {
                return(this.Area.CompareTo(newObj.Area));
            }
            else
            {
                throw new ArgumentException("El objeto es incorrecto");
            }
        }