Share via


Item Property (String)

Gets the specified Category object from the collection, identified by key. In C#, this property is the indexer for the CategoryCollection class.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Overrides ReadOnly Property Item ( _
    categoryName As String _
) As Category
'Usage
Dim instance As CategoryCollection
Dim categoryName As String
Dim value As Category

value = instance.Item(categoryName)
public override Category Item[
    string categoryName
] { get; }
public:
virtual property Category^ Item[String^ categoryName] {
    Category^ get (String^ categoryName) override;
}
JScript does not support indexed properties.

Parameters

  • categoryName
    Type: System..::.String
    An expression that specifies the key value of a member of the collection. The name of the object to find.

Property Value

Type: Microsoft.CommerceServer.Catalog..::.Category
A reference to a specified Category object from the CategoryCollection.

Exceptions

Exception Condition
EntityDoesNotExistException

Thrown if no category in the collection's current page is named categoryName.

Remarks

If categoryName doesn't match any existing member of the collection, an error occurs.

If an object exists within the collection that matches the categoryName, it is returned.

Returns the indexed object within the collection of categories encountered in the catalog.

If the collection is paged, the category must appear on the current page.

This property is the indexer for the CategoryCollection class. The Item property allows for accessing the CategoryCollection by categoryName.

Permissions

See Also

Reference

CategoryCollection Class

CategoryCollection Members

Item Overload

Microsoft.CommerceServer.Catalog Namespace