Advertisement
Guest User

Untitled

a guest
Jun 9th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1.         private bool cmpStr(string s, DateTime c1, DateTime c2)
  2.         {
  3.             if (s == ">") return c1 > c2;
  4.             else if (s == ">=") return c1 >= c2;
  5.             else if (s == "==") return c1 == c2;
  6.             else if (s == "<=") return c1 <= c2;
  7.             else if (s == "<") return c1 < c2;
  8.             else return false;
  9.         }
  10.  
  11.         private bool cmpStr(string s, int c1, int c2)
  12.         {
  13.             if (s == ">") return c1 > c2;
  14.             else if (s == ">=") return c1 >= c2;
  15.             else if (s == "==") return c1 == c2;
  16.             else if (s == "<=") return c1 <= c2;
  17.             else if (s == "<") return c1 < c2;
  18.             else return false;
  19.         }
  20.  
  21.         private bool cmpStr(string s, double c1, double c2)
  22.         {
  23.             if (s == ">") return c1 > c2;
  24.             else if (s == ">=") return c1 >= c2;
  25.             else if (s == "==") return c1 == c2;
  26.             else if (s == "<=") return c1 <= c2;
  27.             else if (s == "<") return c1 < c2;
  28.             else return false;
  29.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement