/// <summary> /// 比较规则值和实际值 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="ruleNum">规则值</param> /// <param name="realNum">实际值</param> /// <returns></returns> private static bool CheckFitSingleRule<T>(T ruleNum, T realNum) where T : struct, IComparable { if (realNum.CompareTo(ruleNum) >= 0) { return true; } return false; }