Click here to Skip to main content
15,923,087 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
i would like to implement multiple propreties in foreach statement using lambda linq.
This is my sample code with just one (the first) assignement:
VB
.RegVel.Where(Function(k) k IsNot Nothing AndAlso (k.Piano = .RegVel(I).Piano And k.Inverter = .RegVel(I).Inverter)).ToList.ForEach(Sub(l) l.CV = .RegVel(I).CV)


How to implement also the second one assisgment in the same line?
1) l.CV = .RegVel(I).CV
2) l.Avanti = .RegVel(I).Avanti
Posted

1 solution

Hit Enter and put the next line of code in there.
VB
...ToList.ForEach(Sub(l)
                      l.CV = .RegVal(I).CV
                      l.Avanti = .RegVal(I).Avanti
                  End Sub)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900