string[] str = {"a","b","c","d"};
        string s = "e";
        Response.Write(System.Array.IndexOf(str, s).ToString());

 

有将返回该字符串在数组中的索引。

无则返回-1;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2022-01-08
  • 2021-07-31
  • 2021-12-12
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案