Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27353

VS 2010 For Each Statement

$
0
0
Here is my code:

Code:

    Dim Indexes As ListView.SelectedIndexCollection = ListViewListOfScheduleItems.SelectedIndices

        If MessageBox.Show("Are you sure you wish to remove the " & Indexes.Count & " selected items?", "Remove", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
            For Each index In Indexes
                ScheduleObjectScheduleItemList.RemoveAt(index)
            Next
            LoadAllScheduleItemsToListView(ListViewListOfScheduleItems, ScheduleObjectScheduleItemList)
        End If

Is there a Step -1 for a "For Each" statement?

Viewing all articles
Browse latest Browse all 27353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>