Click or drag to resize

RoslynEvaluatorCheck Method

Compiles the specified script text without loading it into the AppDomain or writing to the file system.

Namespace:  CSScriptLib
Assembly:  CSScriptLib (in CSScriptLib.dll) Version: 1.3.2.0
Syntax
C#
public void Check(
	string scriptText
)

Parameters

scriptText
Type: SystemString
The script text.

Return Value

Type: 

Implements

IEvaluatorCheck(String)
Examples
try
{
    CSScript.Evaluator
            .Check(@"using System;
                     public class Script
                     {
                         public int Sum(int a, int b)
                         {
                             error
                             return a+b;
                         }
                     }");
}
catch (Exception e)
{
    Console.WriteLine("Compile error: " + e.Message);
}
See Also