Hi Boris,
Looks like that is managed code. Did you create a VS project and try to compile? "Compile" usually means code and not script although .NET is actually JITted and interpreted (i.e. compiled to an intermediate form). Our book covers creating .NET projects. If you really don't want to use managed code, you can do the above with a full trust form in jscript but you'll need to get the right code for that.
Patrick Halstead
Project Manager at Qdabra