Share via


Item Property (String)

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

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

Syntax

'Declaration
Public ReadOnly Property Item ( _
    variantId As String _
) As Variant
'Usage
Dim instance As VariantCollection
Dim variantId As String
Dim value As Variant

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

Parameters

  • variantId
    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: Microsoft.CommerceServer.Catalog..::.Variant
A reference to a specified Variant object from the VariantCollection.

Exceptions

Exception Condition
EntityDoesNotExistException

Thrown if no catalog in the collection's current page is named variantId.

Remarks

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

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

Returns the indexed object within the collection in the catalog.

This property is the indexer for the VariantCollection class. The Item property allows for accessing the VariantCollection by variantId.

Permissions

See Also

Reference

VariantCollection Class

VariantCollection Members

Item Overload

Microsoft.CommerceServer.Catalog Namespace