![]() The result of comparing argument to maxInclusive is greater than zero ( argument is greater than maxInclusive).If the result of comparing argument to minInclusive is less than zero ( argument is less than minInclusive) OR.Throw new ArgumentException("Argument out of range") With that in mind, I think you're just looking for: if(argument.CompareTo(minInclusive) 0) For example, Guard.ArgumentOutOfRange(5, 0, 5) should reject 5 as a valid argument, since we're not allowing the upper and lower bounds themselves as valid values. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |