mirror of
https://github.com/bolucat/Archive.git
synced 2025-10-09 10:01:50 +08:00
19 lines
309 B
C#
19 lines
309 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;
|
|
}
|
|
} |