Sorting a collection in classic ASP (System.Collections.Sortedlist)

Sorting a collection in classic ASP

System.Collections.Sortedlist

set list = server.createObject("System.Collections.Sortedlist")
with list
  .add "something","YY"
  .add "something else","XX"
endwith

for i =0 to list.count -1
    response.write(list.getKey(i)&" = "& list.getByIndex(i)
next

Btw if the following .net classes are available too:

  • System.Collections.Queue
  • System.Collections.Stack
  • System.Collections.ArrayList
  • System.Collections.SortedList
  • System.Collections.Hashtable
  • System.IO.StringWriter
  • System.IO.MemoryStream
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s