public static unsafe void Remove <TElement>(this IRemove <TElement> collection, TElement *elements, Int32 length) where TElement : unmanaged { for (Int32 i = 0; i < length; i++) { collection.Remove(elements[i]); } }
/// <summary> /// Removes all instances of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void Remove <TElement>(this IRemove <TElement> collection, ReadOnlySpan <TElement> elements) { for (Int32 i = 0; i < elements.Length; i++) { collection.Remove(elements[i]); } }
public static void RemoveItems(IRemove removeCollection, int n) { for (int i = 0; i < n; i++) { Console.Write(removeCollection.Remove() + " "); } Console.WriteLine(); }
/// <summary> /// Removes all instances of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <typeparam name="TEnumerator">The type of the enumerator for the <paramref name="elements"/>.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void Remove <TElement, TEnumerator>(this IRemove <TElement> collection, IGetEnumerator <TElement, TEnumerator>?elements) where TEnumerator : notnull, ICurrent <TElement>, IMoveNext { if (elements is not null) { foreach (TElement element in elements) { collection.Remove(element); } } }
/// <summary> /// Removes all instances of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void Remove <TElement>(this IRemove <TElement> collection, Collections.Generic.IEnumerable <TElement>?elements) { if (elements is not null) { foreach (TElement element in elements) { collection.Remove(element); } } }
public override void OnUnloading() { token.Remove(); base.OnUnloading(); }
public int Remove(string id) { return(_removeOperations.Remove(id)); }