///<summary>
 ///Compares the current object with another object of the same type.
 ///</summary>
 ///
 ///<returns>
 ///A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.
 ///</returns>
 ///
 ///<param name="other">An object to compare with this object.</param>
 public int CompareTo(Presupuesto other)
 {
     if (Orden != null && other.Orden != null)
     {
         return(Orden.CompareTo(other.Orden.ToString()));
     }
     return(Id.ToString().CompareTo(other.Id.ToString()));
 }
示例#2
0
        public virtual int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            var sistema = obj as Sistema;

            return(sistema == null ? 1 : Orden.CompareTo(sistema.Orden));
        }
 ///<summary>
 ///Compares the current object with another object of the same type.
 ///</summary>
 ///
 ///<returns>
 ///A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.
 ///</returns>
 ///
 ///<param name="other">An object to compare with this object.</param>
 public int CompareTo(Categoria other)
 {
     return(Orden.CompareTo(other.Orden.ToString()));
 }