我有一个列表,希望去掉第一个元素,但保持下一个的索引不变。例如:
public List<string> Fruit
{
get
{
List<string> fruits = dataSource.GetFruits();
return messageStatuses ;
}
}
返回的结果
[0] -- apple
[1] -- grape
[2] -- orange
[3] -- peach
当第一个项目被移除时,结果应该如下:
[1] -- grape
[2] -- orange
[3] -- peach
Dictionary<Int32, String>
来完成这个任务,并且移除键。 - Mike Christensen