1
2
3
4
5
6
7
8
9
10
11
12
13
|
namespace IsBetween
{
static class Between
{
static public bool isBetween(Point upperLeftEdge, Point lowerRightEdge, Point yourPoint)
{
if (yourPoint.X >= upperLeftEdge.X & yourPoint.Y >= upperLeftEdge.Y & yourPoint.Y <= lowerRightEdge.Y & yourPoint.X <= lowerRightEdge.X)
return true;
else
return false;
}
}
}
|