Partilhar via


Item Property (String)

Gets the specified CatalogObject object from the collection, identified by key. In C#, this property is the indexer for the CatalogObjectCollection`2 class.

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

Syntax

'Declaration
Public Overridable ReadOnly Property Item ( _
    id As String _
) As TObject
'Usage
Dim instance As CatalogObjectCollection
Dim id As String
Dim value As TObject

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

Parameters

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

Property Value

Type: TObject
A reference to a specified CatalogObject object from the CatalogObjectCollection<(Of <(TObject, TDataSet>)>).

Exceptions

Exception Condition
EntityDoesNotExistException

Thrown if no CatalogObject in the collection's current page is named id.

Remarks

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

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

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

This property is the indexer for the CatalogObjectCollection`2 class. The Item property allows for accessing the CatalogObjectCollection`2 by categoryName.

Permissions

See Also

Reference

CatalogObjectCollection<(Of <(TObject, TDataSet>)>) Class

CatalogObjectCollection<(Of <(TObject, TDataSet>)>) Members

Item Overload

Microsoft.CommerceServer.Catalog Namespace