这段代码:
func = CSScript.CreateFunc<int>(@"int f(int[] inputs) { return inputs.Max(); }");
int max = func(new int[]{ 235,123,675,111 });
正在投掷:
error CS1061: 'System.Array' does not contain a definition for 'Max' and no extension method 'Max' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)
我需要System.Linq
在我的函数中注入“ func
”
....我该怎么做?