IsOfCategoryId

bool IsOfCategoryId(this Element element, ElementId categoryId)

True if the element's category id matches the given id.

Parameters

  • elementElement

    The element instance.

  • categoryIdElementId

    The category id to compare.

Returns: True if matches; otherwise false.

Example

bool ok = element.IsOfCategoryId(someCategoryId);