diff Implab/Safe.cs @ 55:c0bf853aa04f

Added initial JSON support +JSONParser +JSONWriter
author cin
date Sun, 15 Jun 2014 19:39:11 +0400
parents 2c332a9c64c0
children 790e8a997d30
line wrap: on
line diff
--- a/Implab/Safe.cs	Sat Apr 26 23:36:00 2014 +0400
+++ b/Implab/Safe.cs	Sun Jun 15 19:39:11 2014 +0400
@@ -25,6 +25,11 @@
                 throw new ArgumentNullException(name);
         }
 
+        public static void ArgumentInRange(int arg, int min, int max, string name) {
+            if (arg < min || arg > max)
+                throw new ArgumentOutOfRangeException(name);
+        }
+
         public static void Dispose<T>(T obj) where T : class
         {
             var disp = obj as IDisposable;