[C#] C#查找对象在ArrayList中的位置 →→→→→进入此内容的聊天室

来自 , 2020-06-14, 写在 C#, 查看 157 次.
URL http://www.code666.cn/view/71f07bf9
  1. ArrayList alcollect = new ArrayList();
  2.  
  3. // Add individual items to the collection
  4.  
  5. string str = "learn csharp";
  6. alcollect.Add(str);
  7.  
  8. //find position of object
  9. Console.WriteLine(alcollect.IndexOf(str));
  10. //csharp/7611

回复 "C#查找对象在ArrayList中的位置"

这儿你可以回复上面这条便签

captcha