public static SRULETYPE GetSType(IRuleValue iRule) { if (iRule.GetType() == typeof(RuleInt)) { return(SRULETYPE.INT); } if (iRule.GetType() == typeof(RuleBool)) { return(SRULETYPE.BOOL); } if (iRule.GetType() == typeof(RuleFloat)) { return(SRULETYPE.FLOAT); } throw new Exception("SRULETYPE unknown: " + iRule); }