ArcGIS Pro 2.6 API Reference Guide
Items Method
Example 

ArcGIS.Desktop.Core Namespace > ItemCategory Class : Items Method
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
// 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 10, Windows 8.1, Windows 7

See Also

Reference

ItemCategory Class
ItemCategory Members