简体   繁体   English

将静态实例作为变量传递? (Noesis Javascript)

[英]Passing a static instance as a variable? (Noesis Javascript)

I'm trying to use Javascript.NET, but I'm having trouble adding a reference to static classes. 我正在尝试使用Javascript.NET,但是在添加对静态类的引用时遇到了麻烦。

jc.SetParameter("test", Log);

Also, "Log" is a static class. 另外,“ Log”是静态类。

I get the 'is a type but is used as a variable' error. 我得到“是一种类型,但用作变量”错误。

Static classes cannot be instantiated. 静态类无法实例化。 You can't pass them as a parameter to methods. 您不能将它们作为方法的参数传递。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM