https://segmentfault.com/a/1190000007881498

或者采用

List<string> stringList = new List<string>();

stringList.Add("One");
stringList.Add("Two");
stringList.Add("Three");
stringList.Add("Four");
stringList.Add("Five");
stringList.Add("Six");
stringList.Add("Seven");

foreach (var item in stringList)
{
int curIndex = stringList.IndexOf(item);

Console.WriteLine(curIndex.ToString());
}

  

相关文章:

  • 2022-12-23
  • 2021-04-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-11-14
相关资源
相似解决方案