Beispiel #1
0
        public override bool Equals(object obj)
        {
            CentroCosto newObj = obj as CentroCosto;

            if (newObj == null)
            {
                return(false);
            }
            else
            {
                return(id.Equals(newObj.id));
            }
        }
Beispiel #2
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            CentroCosto newObj = obj as CentroCosto;

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