Is it possible to pass the parameter after the period on a LINQ Query?
For example on this code:
objResultFinal = objResultFinal.OrderByDescending(x => x.[iwanttopassparameterhere]).ToList();
Is that possible? I want to declare after the "x." the string that I want to query.
objResultFinal.OrderByDescending(s => s.GetType().GetProperty("PropertyName").GetValue(s, null));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With