使用Insert方法;

代码示例如下:

List<int> temp = new List<int>();
temp.Add(2);
temp.Add(3);
temp.Add(4);
temp.Insert(0,5);

temp结果为5,2,3,4

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2021-08-24
  • 2021-08-22
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2021-12-05
  • 2021-07-04
  • 2022-12-23
相关资源
相似解决方案