This article describes how you can emulate C# style enumeration types in PowerScript since PowerScript currently does not support creation of custom enumerations. Personally, I found myself in need of such enumerations when interfacing to Microsoft Word/Excel using OLE Automation.
Calls to Word or Excel functions without enumerated values (or named constants) are incredibly hard to read and understand. An example:
oleDocument.Selection.Move( 10, 2)
oleDocument.Selection.Move( 12, 4)
Using C# style enumerations, the same code could read like this:
oleDocument.Selection.Move( wdUnits.Row, 2)
oleDocument.Selection.Move( wdUnits.Cell, 4)