Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets the Promocode string from the current collection, based upon the specified index.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Property Item ( _
index As Integer _
) As String
'Usage
Dim instance As PromoCodeStringCollection
Dim index As Integer
Dim value As String
value = instance.Item(index)
instance.Item(index) = value
public string Item[
int index
] { get; set; }
public:
property String^ Item[int index] {
String^ get (int index);
void set (int index, String^ value);
}
JScript does not support indexed properties.
Parameters
- index
Type: System..::.Int32
The zero-based index of the Promocode string to retrieve.
Property Value
Type: System..::.String
The Promocode string with the specified index.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The collection does not contain an element with this index. |
ArgumentNullException | The Promocode string parameter is nullNothingnullptra null reference (Nothing in Visual Basic). |
ArgumentException | The Promocode string contained only whitespace characters, or had zero length, or exceeded a maximum length of 50 characters. |
Remarks
Stores the Promocode string from the current collection, based upon the specified index.
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