Datatype for categories. Used to classify pages with system-wide categories.

Namespace:  EPiServer.Core
Assembly:  EPiServer (in EPiServer.dll) Version: 6.0.530.0

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());

Inheritance Hierarchy

System..::.Object
  EPiServer.Core..::.CategoryList

See Also