Click or drag to resize

CompileInfoRootClass Property

Gets or sets the root class name.

This setting is required as Roslyn cannot produce compiled scripts with the user script class defined as a top level class. Thus all user defined classes are in fact nested classes with the root class named by Roslyn as "Submission#0". This leads to the complications when user wants to reference script class in another script. Specifically because C# treats "Submission#0" as an illegal class name.

C# helps the situation by allowing user specified root name RootClass, which is by default is "css_root".

Namespace:  CSScriptLib
Assembly:  CSScriptLib (in CSScriptLib.dll) Version: 1.3.2.0
Syntax
C#
public string RootClass { get; set; }

Property Value

Type: String
The root class name.
See Also