Datatype for categories. Used to classify pages with system-wide categories.
Namespace:
EPiServer.CoreAssembly: EPiServer (in EPiServer.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
[SerializableAttribute] public class CategoryList : IComparable, IEnumerable<int>, IEnumerable, IReadOnly<CategoryList>, IReadOnly |
Remarks
CategoryList is a lightweight collection of Int32 values pointing to categories. Used primarily from the Category property on PageData class which holds page information.
If you need to populate a category list based on names, there is a helper method: ResolveCategoryNames(String).
Examples
Example of enumeration all categories on a page
CopyC#
foreach (int id in CurrentPage.Category) Response.Write("Member of=" + id.ToString());