2

I am new to using Jint (the Javascript Interpreter for .NET) and am trying to gain a better understanding of the complete functionality. Looking at the documentation, I see support of Generic types like so:

jint> var ListOfString = System.Collections.Generic.List(System.String);
jint> var list = new ListOfString();
jint> list.Add('foo');

I do not see anywhere any mention of use of methods that take a generic parameter. For instance, take the C# method:

public T Get<T>(T t) => t;

When I run the following script in Jint I get a JSValue.Value of False (bool) with a type of string whenever a value of "test" is expected.

Get<System.String>("test");

Is calling a method with generics such as this possible in Jint?

0 Answers0