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
- item
Type: Microsoft.CommerceServer.Runtime.Marketing..::.DiscountItem
The DiscountItem to search for.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.