Exemplo n.º 1
0
 /// <summary>
 /// Provide a default ascending comparer for all BusinessLogicBase derived classes.  Comparisson is made against ToString() method.
 /// </summary>
 /// <param name="x">First parameter of BusinessLogicBase type</param>
 /// <param name="y">Second parameter of BusinessLogicBase type</param>
 /// <returns>Comparisson result</returns>
 public static int DefaultComparerAsc(BusinessLogicBase x, BusinessLogicBase y)
 {
     try
     {
         return(x.ToString().CompareTo(y.ToString()));
     }
     catch (Exception) { return(0); }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Provide a default descending comparer for all BusinessLogicBase derived classes.  Comparisson is made against ToString() method.
 /// </summary>
 /// <param name="x">First parameter of BusinessLogicBase type</param>
 /// <param name="y">Second parameter of BusinessLogicBase type</param>
 /// <returns>Comparisson result</returns>
 public static int DefaultComparerDesc(BusinessLogicBase x, BusinessLogicBase y)
 {
     return(y.ToString().CompareTo(x.ToString()));
 }