List删除

使用for循环,倒序删除:

 for (int i = list.Count - 1; i >= 0; i--) {
     var item = list[i];

     if (item = "222") {
         list.Remove(item);
     }
 }
原文地址:https://www.cnblogs.com/tangchun/p/9796386.html