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

VS 2008 Is the ORDER of things in a LIST(OF) respected as things are added or removed from it

$
0
0
Got this code - basically creating a LIST(OF) some class I've got. Later on in code I will be adding to this _RequestList (as shown).

Code:

Private _RequestList As New List(Of _dcxRequest)

    Private Class _dcxRequest
        Public SearchText As dcxST
        Public SearchBit As Integer
.
.
.
    End Class
.
.
.
    _RequestList.Add(New _dcxRequest(st, sl, i))

If later on I do a FOR EACH - will the order always be the same - even after I add more and more items?

Code:

            For Each dr As _dcxRequest In drl
.
.
.  do some work here - am I always getting DR objects in the same order??
.
.
            Next


Viewing all articles
Browse latest Browse all 27554

Trending Articles



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