List<int> _lstInfos = new List<int>();
int _maxCountHold = 10;
// 移除超出最大数量的行
private void RemoveList()
{
var countNeedRemove = _lstInfos.Count - _maxCountHold;
if (countNeedRemove > 0)
{
_lstInfos.RemoveRange(0, countNeedRemove);
}
}
移除超出规定List最大数量的数据
最新推荐文章于 2025-02-26 10:08:38 发布
关键词由优快云通过智能技术生成