Skip to main content
I think you meant Linq not LING
Link
MethodMan
  • 18.9k
  • 6
  • 41
  • 53

DataTable LINGLinq with two join statements in C#

Source Link
user1700890
  • 7.8k
  • 22
  • 106
  • 212

DataTable LING with two join statements in C#

My code:

var Result = from TempRow in ArrAbsDiff where TempRow.Strike == StrikeOfMinAbsDiff select TempRow.PutMidPrice; 

I know that the above code return just one value of type decimal (maybe double). However, Result is of type Enumerable and I could not easily write Result + 2. I need to convert it property. I can do it through the following code:

var Result = (from TempRow in ArrAbsDiff where TempRow.Strike == StrikeOfMinAbsDiff select TempRow.PutMidPrice).Min(); 

Is there more efficient way to accomplish it?

Regards,