ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Core Namespace / ItemCategory Class / Items Method
Example

In This Topic
    Items Method
    In This Topic
    Returns an IEnumerable subset of items from an IEnumerable of items where the returned items participate in the Item Category.
    Syntax

    Parameters

    items

    Return Value

    A Task returning an enumerable collection of Item
    Example
    Using Item Categories
    // Browse items using an ItemCategory as a filter
    IEnumerable<Item> gdbContents = gdb.GetItems();
    IEnumerable<Item> filteredGDBContents1 = gdbContents.Where(item => item.ItemCategories.OfType<ItemCategoryDataSet>().Any());
    IEnumerable<Item> filteredGDBContents2 = new ItemCategoryDataSet().Items(gdbContents);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also