Share via


Contains Method

Returns a value indicating if a specific DiscountItem is within the DiscountItemCollection.

Namespace:  Microsoft.CommerceServer.Runtime.Marketing
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Function Contains ( _
    item As DiscountItem _
) As Boolean
'Usage
Dim instance As DiscountItemCollection
Dim item As DiscountItem
Dim returnValue As Boolean

returnValue = instance.Contains(item)
public bool Contains(
    DiscountItem item
)
public:
bool Contains(
    DiscountItem^ item
)
public function Contains(
    item : DiscountItem
) : boolean

Parameters

Return Value

Type: System..::.Boolean
true if the specified DiscountItem is within the DiscountItemCollection; otherwise false.

Exceptions

Exception Condition
NotSupportedException

Always throws this exception.

Remarks

Returns a value indicating if a specific DiscountItem is within the DiscountItemCollection. A true is returned if a discount is present in the discount item collection. This method will return true if the DiscountItem instance is different, but refers to the same item in the content list.

Permissions

See Also

Reference

DiscountItemCollection Class

DiscountItemCollection Members

Microsoft.CommerceServer.Runtime.Marketing Namespace