Uipath invoke Csharp

Event: Uipath calls c# code to implement a function (the sum of the values in an array is equal to a fixed value and the Numbers are retrieved)
The problem: use the invoke code to report an error. I don’t know what the problem is
The code:

public static IEnumerable<string> GetCombinations(int[] set, int sum, string values) {
  for (int i = 0; i < set.Length; i++) {
    int left = sum - set[i];
    string vals = set[i] + "," + values;
    if (left == 0) {
      yield return vals;
    } else {
      int[] possible = set.Take(i).Where(n => n <= sum).ToArray();
      if (possible.Length > 0) {
        foreach (string s in GetCombinations(possible, left, vals)) {
          yield return s;
        }
      }
    }
  }
}

error:


本人对于Csharp不了解,Uipath调用c#的用法也是第一次尝试,有大神可以帮解决么,谢谢啦…^.^