Files
GeekDesk/Util/WrpaPanel/ItemRange.cs
2023-04-06 18:10:49 +08:00

26 lines
563 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GeekDesk.Util.WrpaPanel
{
public struct ItemRange
{
public int StartIndex { get; }
public int EndIndex { get; }
public ItemRange(int startIndex, int endIndex) : this()
{
StartIndex = startIndex;
EndIndex = endIndex;
}
public bool Contains(int itemIndex)
{
return itemIndex >= StartIndex && itemIndex <= EndIndex;
}
}
}