Пример #1
0
 //////////////////////////////////////////////////////////////////////////
 private static int ComparePriorityAscending(ProjectPackage p1, ProjectPackage p2)
 {
     if (p1 == null)
     {
         if (p2 == null)
         {
             return(0);
         }
         else
         {
             return(-1);
         }
     }
     else
     {
         if (p2 == null)
         {
             return(1);
         }
         else
         {
             if (p1.Priority < p2.Priority)
             {
                 return(-1);
             }
             else if (p1.Priority > p2.Priority)
             {
                 return(1);
             }
             else
             {
                 return(0);
             }
         }
     }
 }
 //////////////////////////////////////////////////////////////////////////
 private static int ComparePriorityAscending(ProjectPackage p1, ProjectPackage p2)
 {
     if (p1 == null)
     {
         if (p2 == null) return 0;
         else return -1;
     }
     else
     {
         if (p2 == null) return 1;
         else
         {
             if (p1.Priority < p2.Priority) return -1;
             else if (p1.Priority > p2.Priority) return 1;
             else return 0;
         }
     }
 }