Monday, January 9, 2006


How to use .net utility classes from VBSscript

Of Kings and Cabbage discovered the a feature I did not know about: several .net utility classes are registered in com so you can use them from clients like vbscript, javascript, asp, vb, …

Some of the classes accessible from COM are:

  • System.Collections.Queue

  • System.Collections.Stack

  • System.Collections.ArrayList

  • System.Collections.SortedList

  • System.Collections.Hashtable

  • System.IO.StringWriter

  • System.IO.MemoryStream

  • System.Text.StringBuilder

  • System.Random

Good to know the next time I have to put together a quick script or asp page. Imagine using System.Text.StringBuilder.AppendFormat() instead of formatting the strings by hand!

Marvels of COM .NET interop has more information on how to use the various methods.

No comments:

Post a Comment