Range.cs 499 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ClashDotNetFramework.Models.Structs
  7. {
  8. public readonly struct Range
  9. {
  10. public int Start { get; }
  11. public int End { get; }
  12. public Range(int start, int end)
  13. {
  14. Start = start;
  15. End = end;
  16. }
  17. public bool InRange(int num)
  18. {
  19. return Start <= num && num <= End;
  20. }
  21. }
  22. }