Пример #1
0
 public override bool keepIf(string current_field, CutValues cut_vals)
 {
     // Because we know this is a single-value cut - we can cast
     // to SingleCutVal
     if (cut_vals is SingleCutVal)
     {
         SingleCutVal scv = (SingleCutVal)cut_vals;
         return(current_field == scv.cut_val);
     }
     else
     {
         // Throw exception ...
         return(false);
     }
 }//KeepIf
Пример #2
0
        public override bool keepIf(string current_field, CutValues cut_vals)
        {
            if (cut_vals is SingleCutVal)
            {
                SingleCutVal scv             = (SingleCutVal)cut_vals;
                double       current_field_d = Convert.ToDouble(current_field);
                double       cut_val_d       = Convert.ToDouble(scv.cut_val);

                return(current_field_d <= cut_val_d);
            }
            else
            {
                // Throw exception
                return(false);
            }
        }