Share via


SimpleList.Delete Method (BCL)

Use this method to delete the specified item from the SimpleList object.

Definition

[Visual Basic .NET]

Public Sub Delete(Index As Integer)

[C#]

public void Delete(intIndex);

Parameters

[Visual Basic .NET]

  • Index
    An Integer value that contains the index value of the item to delete.

[C#]

  • Index
    An Integer value that contains the index value of the item to delete.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

The following table shows the custom COM error codes that may be present in any exception thrown.

Constant Description
DISP_E_BADINDEX The Index parameter references an out-of-range value. This means that Index contains a value either larger than the SimpleList object or less than zero.

[Visual Basic .NET]

Example

' The following example deletes the SimpleList item at index 1008 
' oSimpleList is a Commerce SimpleList object
oSimpleList.Delete(1008)

Requirements

Namespace: Microsoft.CommerceServer.Runtime

Platforms: Windows 2000, Windows Server 2003

Assembly: mscscorelib (in mscscorelib.dll)

See Also

SimpleList Class

SimpleList.Add

SimpleList.Count

Copyright © 2005 Microsoft Corporation.
All rights reserved.