方法1
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
1 int[] ia = {1,2,3}; 2 int id = Array.IndexOf(ia,1); // 这里的1就是你要查找的值
1 string[] strArr = {"a","b","c","d","e"}; 2 bool exists = ((IList)strArr).Contains("a");
[1] https://www.cnblogs.com/superelement/p/7691229.html
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。