CS-Script 2.7.0

Autoclass

/autoclass or /ac - generates wrapper class if the script does not define any type

In this mode the script engine automatically generates wrapper class if the script does not define any class of its own.

This feature is a light weight flavor of the Classless Scripts support. The important difference is that Autoclass support is a native (embedded) feature of the script engine and does not require any external file to work (Clssless Scripts require Alternative Compiler implemented as a separate assembly).
cscs /autoclass script.cs
Script.cs:
using System;

void Main()
{
    Console.WriteLine(
"Hello World!");
}

The script above at runtime willl be interprited as following:

using System;

public class ScriptClass
{
    static void Main()
    {
        Console.WriteLine(
"Hello World!");
    }
}

Note: the /autoclass switch does not interfire with execution of normal class containing scripts.

See Also

Command-line interfaceClassless Scripts