> > > If this my my code I'd remove the Object altogether and make a range class > to pass in - that way you don't need any checks and it would be faster. >
+1 to this. It always bugged me that I have to send a generic object as a function parameter. If we have a typed object, we get the checks built-in.