skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class CollectionExtensions

Inheritance
System.Object
CollectionExtensions
Namespace: Telerik.UI.Xaml.Controls
Assembly: Telerik.WinUI.Controls.dll

Syntax

public static class CollectionExtensions : Object

Methods

AddRange(ItemCollection, IEnumerable)

Declaration
public static void AddRange(this ItemCollection list, IEnumerable items)
Parameters
Microsoft.UI.Xaml.Controls.ItemCollection list

System.Collections.IEnumerable items

AddRange(IList, IEnumerable)

Declaration
public static void AddRange(this IList list, IEnumerable items)
Parameters
System.Collections.IList list

System.Collections.IEnumerable items

AddRange<T>(ICollection<T>, IEnumerable<T>)

Declaration
public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T> items)
Parameters
System.Collections.Generic.ICollection<T> collection

System.Collections.Generic.IEnumerable<T> items

Type Parameters
T

Append<T>(IEnumerable<T>, T)

Declaration
public static IEnumerable<T> Append<T>(this IEnumerable<T> source, T other)
Parameters
System.Collections.Generic.IEnumerable<T> source

T other

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

Append<T>(IEnumerable<T>, IEnumerable<T>)

Declaration
public static IEnumerable<T> Append<T>(this IEnumerable<T> source, IEnumerable<T> other)
Parameters
System.Collections.Generic.IEnumerable<T> source

System.Collections.Generic.IEnumerable<T> other

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

RemoveAll(IList, Predicate<Object>)

Declaration
public static int RemoveAll(this IList list, Predicate<object> match)
Parameters
System.Collections.IList list

System.Predicate<System.Object> match

Returns
System.Int32

RemoveAll<T>(ICollection<T>, Predicate<T>)

Declaration
public static int RemoveAll<T>(this ICollection<T> collection, Predicate<T> match)
Parameters
System.Collections.Generic.ICollection<T> collection

System.Predicate<T> match

Returns
System.Int32

Type Parameters
T

RemoveAll<T>(IList<T>)

Declaration
public static void RemoveAll<T>(this IList<T> collection)
Parameters
System.Collections.Generic.IList<T> collection

Type Parameters
T

TakeAfter<T>(IEnumerable<T>, Func<T, Boolean>)

Declaration
public static IEnumerable<T> TakeAfter<T>(this IEnumerable<T> target, Func<T, bool> predicate)
Parameters
System.Collections.Generic.IEnumerable<T> target

System.Func<T, System.Boolean> predicate

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeBefore<T>(IEnumerable<T>, Func<T, Boolean>)

Declaration
public static IEnumerable<T> TakeBefore<T>(this IEnumerable<T> target, Func<T, bool> predicate)
Parameters
System.Collections.Generic.IEnumerable<T> target

System.Func<T, System.Boolean> predicate

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeBetween<T>(IEnumerable<T>, T, T)

Declaration
public static IEnumerable<T> TakeBetween<T>(this IEnumerable<T> target, T item1, T item2)
Parameters
System.Collections.Generic.IEnumerable<T> target

T item1

T item2

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeBetween<T>(IEnumerable<T>, Func<T, Boolean>, Func<T, Boolean>)

Declaration
public static IEnumerable<T> TakeBetween<T>(this IEnumerable<T> target, Func<T, bool> predicate1, Func<T, bool> predicate2)
Parameters
System.Collections.Generic.IEnumerable<T> target

System.Func<T, System.Boolean> predicate1

System.Func<T, System.Boolean> predicate2

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeFrom<T>(IEnumerable<T>, T)

Declaration
public static IEnumerable<T> TakeFrom<T>(this IEnumerable<T> target, T item)
Parameters
System.Collections.Generic.IEnumerable<T> target

T item

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeFrom<T>(IEnumerable<T>, Func<T, Boolean>)

Declaration
public static IEnumerable<T> TakeFrom<T>(this IEnumerable<T> target, Func<T, bool> predicate)
Parameters
System.Collections.Generic.IEnumerable<T> target

System.Func<T, System.Boolean> predicate

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeTo<T>(IEnumerable<T>, T)

Declaration
public static IEnumerable<T> TakeTo<T>(this IEnumerable<T> target, T item)
Parameters
System.Collections.Generic.IEnumerable<T> target

T item

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

TakeTo<T>(IEnumerable<T>, Func<T, Boolean>)

Declaration
public static IEnumerable<T> TakeTo<T>(this IEnumerable<T> target, Func<T, bool> predicate)
Parameters
System.Collections.Generic.IEnumerable<T> target

System.Func<T, System.Boolean> predicate

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

ToEnumerable<T>(T)

Declaration
public static IEnumerable<T> ToEnumerable<T>(this T item)
Parameters
T item

Returns
System.Collections.Generic.IEnumerable<T>

Type Parameters
T

Getting Started
  • Install Now
  • Demos
Support Resources
  • Knowledge Base
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.