Method GetCategories
GetCategories()
Returns an array of all the Category instances linked to this CatalogItem instance. catalog.
Declaration
public Category[] GetCategories()
Returns
Type | Description |
---|---|
Category[] | An array of all the categories linked to this CatalogItem instance. |
Remarks
Keep in mind that this method allocates an array. If you want to avoid allocations, please consider using GetCategories(ICollection<Category>) instead.
GetCategories(ICollection<Category>)
Fills the given target
collection with all the
Category instances linked to this
CatalogItem instance.
The target
collection is cleared before being
populated.
Declaration
public int GetCategories(ICollection<Category> target)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Category> | target | The target container of all the Category instances. |
Returns
Type | Description |
---|---|
int | The number of Category instances linked to this CatalogItem instance. |