Quantcast
Viewing all articles
Browse latest Browse all 15795

[RESOLVED] About RC6.Collection

The values returned by oList(1) and oList.ItemByIndex(1) are different.

Code:

Private Sub Form_Load()
    Dim oList As cCollection
   
    Set oList = New_c.Collection
   
    oList.Add 111
    oList.Add 222
    oList.Add 333
   
    Debug.Print oList(1)
    Debug.Print oList.ItemByIndex(1)
   
End Sub

I know that oList(1) is equivalent to oList.Item(1), and I also know that the correct usage of Item should be oList.Item(Key), but different values returned by oList(1) and oList.ItemByIndex(1) is still confusing.

This makes me sometimes have to use cArrayList instead of cCollection, but cArrayList has no JSON serialization functions.

Viewing all articles
Browse latest Browse all 15795

Trending Articles



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