osu.Framework/Graphics/Containers/Container.cs
/// <summary>
/// Removes all children which match the given predicate.
/// This is equivalent to calling <see cref="Remove(T)"/> for each child that
/// matches the given predicate.
/// </summary>
/// <returns>The amount of removed children.</returns>
Removes all children which match the given predicate.
This is equivalent to calling  for each child that
matches the given predicate.
Removes all children which match the given predicate . This is equivalent to calling for each child that matches the given predicate .
public int RemoveAll(Predicate<T> pred)
        {
            if (Content != this)
                return Content.RemoveAll(pred);
            int removedCount = 0;
            for (int i = 0; i < InternalChildren.Count; i++)
            {
                var tChild = (T)InternalChildren[i];
                if (pred.Invoke(tChild))
                {
                    RemoveInternal(tChild);
                    removedCount++;
                    i--;
                }
            }
            return removedCount;
        }
public int RemoveAll ( Predicate < T > pred ) { if ( Content != this ) return Content . RemoveAll ( pred ) ; int removedCount = 0 ; for ( int i = 0 ; i < InternalChildren . Count ; i ++ ) { var tChild = ( T ) InternalChildren [ i ] ; if ( pred . Invoke ( tChild ) ) { RemoveInternal ( tChild ) ; removedCount ++ ; i -- ; } } return removedCount ; }
Removes all children which match the given predicate.
Removes all children which match the given predicate .
The amount of removed children.
The amount of removed children .
pred
Predicate<T>