c#查找string数组的某一个值的索引

string[] array = { "A","B","C","D","H"};

  var index=array.ToList().IndexOf("D");
使用IndexOf()方法,返回数组元素在数组中的索引。
  index=3;
 
 
转自:https://www.cnblogs.com/mbtq/p/5810125.html
原文地址:https://www.cnblogs.com/redhairboy/p/9062712.html