IList扩展

删除操作

data.RemoveAll(x => x.Key == "***");

public static void RemoveAll<T>(this IList<T> src, Predicate<T> match)
{
    int count = src.Count;
    while (count-- > 0)
    {
        if (match(src[count]))
        {
            src.RemoveAt(count);
        }
    }
}
原文地址:https://www.cnblogs.com/wesson2019-blog/p/12738929.html