IsInRange

public static bool IsInRange(this int target, int start, int end) {

return target >= start && target <= end;

}
Example:
int foo = 4;
Console.WriteLine(foo.IsInRange(2,6)); // output 'True'

Description

Finds if the int is the specified range

Details

Double click on the code to select all.

 

;