I want order to object array by one of its variables "n_common" and this gives me error:
you can´t convert Lambda expressions in the type array because is not a type delegate.
cartesian_product.Sort((a, b) => -1 * a.n_common.CompareTo(b.n_common));
I want to order descending my "Pair" object that contains 3 variable "p", "q" and "n_common", it should be ordered by the "n_common", the cartesian_product is a array of Pair object.
I am not working with Linq just with Lambda expression or at least that is how I understand it anyway I put the linq in the header and the problem continues