Contains Method
Returns a value indicating whether a promo code string is contained within the PromoCodeStringCollection.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function Contains ( _
promotionCode As String _
) As Boolean
'Usage
Dim instance As PromoCodeStringCollection
Dim promotionCode As String
Dim returnValue As Boolean
returnValue = instance.Contains(promotionCode)
public bool Contains(
string promotionCode
)
public:
bool Contains(
String^ promotionCode
)
public function Contains(
promotionCode : String
) : boolean
Parameters
- promotionCode
Type: System..::.String
The promo code string to be searched for.
Return Value
Type: System..::.Boolean
true if the promo code string is within the collection; otherwise false.
Remarks
Returns a value indicating whether a promo code string is contained within the PromoCodeStringCollection.
Returns true if the specified string is in the collection. false if the specified string is not in the collection, is nullNothingnullptra null reference (Nothing in Visual Basic), or is not of type string.
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.
See Also
Reference
PromoCodeStringCollection Class