C#MSScript控件使数组可见

C#MSScript控件使数组可见,c#,arrays,msscriptcontrol,C#,Arrays,Msscriptcontrol,我正在使用MS ScriptControl将脚本添加到我的应用程序中。除了我有一个对脚本引擎可见的类(该类有一个数组)之外,其他一切都可以正常工作。我无法从脚本访问数组元素 示例C#类: 我将该类添加到脚本引擎: script.AddObject("test", new test(), true); 我内置了一些打印对象的功能。以下是我的结果: test.this_works -> "Hello" test.no_workey -> System.String[] te

我正在使用MS ScriptControl将脚本添加到我的应用程序中。除了我有一个对脚本引擎可见的类(该类有一个数组)之外,其他一切都可以正常工作。我无法从脚本访问数组元素

示例C#类:

我将该类添加到脚本引擎:

script.AddObject("test", new test(), true);
我内置了一些打印对象的功能。以下是我的结果:

test.this_works   ->  "Hello"
test.no_workey    -> System.String[]
test.no_workey[0] -> 'test.no_workey.0' is null or not an object.
有人知道我怎么做吗? 谢谢

test.this_works   ->  "Hello"
test.no_workey    -> System.String[]
test.no_workey[0] -> 'test.no_workey.0' is null or not an object.