ComponentOne List for WinForms
In This Topic
    Removing Members
    In This Topic

    Regardless of how a collection implements the Add or Insert methods, the syntax for removing items is the same. To remove an existing item from a collection, use the RemoveAt method:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    ' Remove the Split object with index 1.   
    Me.C1List1.Columns(0).ValueItems.Values.RemoveAt(1)
    

    To write code in C#

    C#
    Copy Code
    // Remove the Split object with index 1.   
    this.c1List1.Columns[0].ValueItems.Values.RemoveAt(1);
    

    After this statement is executed, all splits with collection indexes greater than 1 will be shifted down by 1 to fill the place of the removed split.