1 int[] ia = {1,2,3};
2 int id = Array.IndexOf(ia,1); // 这里的1就是你要查找的值

 方法2

1 string[] strArr = {"a","b","c","d","e"};
2 bool exists = ((IList)strArr).Contains("a");

参考网址

  [1] https://www.cnblogs.com/superelement/p/7691229.html

相关文章:

  • 2021-05-31
  • 2022-12-23
  • 2022-02-13
  • 2021-08-17
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2021-12-04
  • 2022-02-11
相关资源
相似解决方案