我需要一个与列表类似的集合,当达到特定长度时,它应该开始从第一个索引覆盖值,并按循环顺序继续。
例如,对于4个项目的限制:
specialList.Add(100); // {100}
specialList.Add(101); // {100, 101}
specialList.Add(102); // {100, 101, 102}
specialList.Add(103); // {100, 101, 102, 103}
specialList.Add(104); // {104, 101, 102, 103}
specialList.Add(105); // {104, 105, 102, 103}
myList[index] = newValue
)并设置新值。 - Alex