BT

CS-Script - The C# Script Engine

| by Jonathan Allen Follow 575 Followers on Feb 14, 2007. Estimated reading time: 1 minute |

Do you wish for a scripting language with access to the .NET Framework and the syntax of C#? With CS-Script, you get just that.

CS-Script supports running individual C# files as if they were script files. The author claims the system has a performance hit of only 40 to 60 seconds over compiled executables. The script engine can target both 1.1. and 2.0 frameworks.

CS-Script supports assembly references in one of two ways. The first option is to implicitly pull in assemblies by searching the Global Assembly Cache (GAC) and local directory for assemblies with names that match the needed namespace. According to the documentation:

The approach is based on the fact that in a real life there is a strong correlation between the assembly name and the root namespace. For example, the namespace System.Windows.Forms is implemented in the assembly System.Windows.Forms, and the namespace System.XML is implemented in the assembly System.XML. This is also applicable to the assembly file name, which is usually a DLL file with the same name as the assembly name.
The second method is to embed the reference as a comment using "//css_reference ;"

CS-Script can also be used as a host to enable script support from within another application.

 

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT