/bundles/itninjaweb/img/Breadcrumb_cap_w.png
Something which I discovered quite by accident is that you can access lots of .Net functionality from VBScript.

For example, anyone who's progressed beyond the "Hello World" type script will know what a pain it is dealing with arrays. Leaving aside the response "So use dictionaries instead", how about using .Net's ArrayList methods? To wit:Option Explicit

Dim objDataList
Dim strItem

Set objDataList = CreateObject("System.Collections.ArrayList")

With objDataList
.Add "B"
.Add "C"
.Add "E"
.Add "D"
.Add "A"

.Sort()
End With

For Each strItem in objDataList
Wscript.Echo strItem
Next

WScript.Echo vbCRLF & "Now, remove element 'D' and we get:"

objDataList.Remove("D")

For Each strItem in objDataList
Wscript.Echo strItem
Next
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

There are no answers at this time
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers