diff --git a/src/Scripting/CSharp/CSharpScript.cs b/src/Scripting/CSharp/CSharpScript.cs
index 1b97f0ce41b043a510301f626af7faee861d5494..581e98394f37504c01e27089a1225df13a04dbd5 100644
--- a/src/Scripting/CSharp/CSharpScript.cs
+++ b/src/Scripting/CSharp/CSharpScript.cs
@@ -24,8 +24,10 @@ public static class CSharpScript
/// Type of global object.
/// Custom assembly loader.
/// The return type of the script
+ /// Code is null.
public static Script Create(string code, ScriptOptions options = null, Type globalsType = null, InteractiveAssemblyLoader assemblyLoader = null)
{
+ if (code == null) throw new ArgumentNullException(nameof(code));
return Script.CreateInitialScript(CSharpScriptCompiler.Instance, SourceText.From(code, options?.FileEncoding), options, globalsType, assemblyLoader);
}
@@ -52,8 +54,10 @@ public static Script Create(Stream code, ScriptOptions options = null, Typ
/// The script options.
/// Type of global object.
/// Custom assembly loader.
+ /// Code is null.
public static Script