Search code examples
c#javascript.net

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.

jc.SetParameter("test", Log);

Also, "Log" is a static class.

I get the 'is a type but is used as a variable' error.


Solution

  • Static classes cannot be instantiated. You can't pass them as a parameter to methods.