0

I have the following line in VB

Dim Totalstock = (From stock In StockInfo.Record, locs In Location.BranchList Where locs.Key.Item1 = "Deliver" And locs.Key.Item2 = stock.WHLO Select stock).ToArray

which i need to translate to C#. I am used to using the lambda statements in Linq, but with this query I have no idea how to convert it.

Perhaps anyone who could help me out?

Dennis Lukas
  • 483
  • 2
  • 6
  • 20

1 Answers1

2
var Totalstock = (
    from stock in StockInfo.Record
    from locs in Location.BranchList
    where locs.Key.Item1 == "Deliver" && locs.Key.Item2 == stock.WHLO
    select stock).ToArray();
Seabizkit
  • 2,417
  • 2
  • 15
  • 32