摘要:
string[] array = { "A","B","C","D","H"}; var index=array.ToList().IndexOf("D"); 使用IndexOf()方法,返回数组元素在数组中的索引。 index=3; string[] array = { "A","B","C"," 阅读全文
摘要:
//使用lambda表达式过滤掉空字符串strArray = strArray.Where(s=>!string.IsNullOrEmpty(s)).ToArray(); 阅读全文