You defined an implicit statement from the delegate type Func<OPTatom, OPTatom, T> and are trying to convert from a lambda expression that seems strange to the C # compiler.
Instead, save the lambda expression in some variable of type Func<OPTatom, OPTatom, T> , and then do the implicit conversion. The following will work here:
Func<OPTatom, OPTatom, T> temp = (i, j) => cost[i, j]; DualElement<double> dubidu = temp;
I created a demo and it worked fine.
public class Program { public static void Main() { Func<string, bool> func = d => true; Process<bool> p = func;
There is a dotnetfiddle link here if you want to play with it.
source share