The collection has something common with Dictionary in VBScript, but they are not the same thing.
Collection is object such as Session.Contents property.
Dictionary is an object created using the following code.
Dim dictObj
Set dictObj = CreateObject("Scripting.Dictionary")
I want to find the differences and commons with these two type objects, in order to know how to use them.
I have found these useful articles, but still not clearly understand what a collection really is in asp using VBScript.
My questions are:
Is there no Collection data type in VBScript? you can create a dictionary but you can not create a collection object.
When loop through the collection using For Each, what is the x is, the key of collection or the collection item value?
for each x in Session.ContentsWhy can you use collection this way?
Session("FirstName")is the same as
Session.Contents("FirstName")What is the documentation of collection object?
The documentation of dictionary I can find is this
I may have misunderstood collection object, I so please tell me. Thank you so much.