コード例 #1
0
        /// <summary>
        /// Method that swap elements in sortable array
        /// </summary>
        /// <param name="firstArg">First argument</param>
        /// <param name="secondArg">Second argument</param>
        private static void Swap(ref SingleRow firstArg, ref SingleRow secondArg)
        {
            SingleRow tmpArg = firstArg;

            firstArg = secondArg;

            secondArg = tmpArg;
        }
コード例 #2
0
 /// <summary>
 /// Set decscending sort mode
 /// </summary>
 /// <param name="firstArg">First comparable object</param>
 /// <param name="secondArg">Second comparable object</param>
 /// <returns>True(firstArg > secondArg) or False(firstArg > secondArg)</returns>
 private static bool DescendingSortRules(SingleRow firstArg, SingleRow secondArg)
 {
     if (firstArg.key > secondArg.key)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }