【发布时间】:2018-07-04 12:57:54
【问题描述】:
当我使用以下 sn-p 时,我得到一个 ScrptEngineException,表明该对象不支持该属性或方法。
var engine = new JScriptEngine();
engine.AddHostType("String", typeof(System.String));
engine.ExecuteCommand("test = 'variabel'; test.StartsWith('nice');");
我尝试了一些其他的字符串函数,如 IndexOf、ToArray(扩展)和其他一些,但似乎不起作用。
谁能帮帮我?
【问题讨论】:
标签: c# clearscript