コード例 #1
0
 private static bool IsNumberOrNull(object[] x, SortParam p, bool emptyLast)
 {
     return(x[p.Col - 1] == null ||
            (emptyLast && x[p.Col - 1] is string && (string)x[p.Col - 1] == string.Empty) ||
            x[p.Col - 1] is double ||
            x[p.Col - 1] is int);
 }
コード例 #2
0
 private static object SortValue(object[] x, SortParam p, object defaultValue)
 {
     if (x[p.Col - 1] == null || (x[p.Col - 1] is string && (string)x[p.Col - 1] == string.Empty))
     {
         return(defaultValue);
     }
     return(x[p.Col - 1]);
 }