mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
20 lines
367 B
C#
20 lines
367 B
C#
namespace Netch.Models
|
|
{
|
|
public readonly struct NumberRange
|
|
{
|
|
public int Start { get; }
|
|
|
|
public int End { get; }
|
|
|
|
public NumberRange(int start, int end)
|
|
{
|
|
Start = start;
|
|
End = end;
|
|
}
|
|
|
|
public bool InRange(int num)
|
|
{
|
|
return Start <= num && num <= End;
|
|
}
|
|
}
|
|
} |