I have a class that represents an entity in the database. This class runs a procedure that returns its data. I created a list of type and this list is loaded. Let's say this is the loaded list: vlstMinhaEntidade
. How do I go through this list with lambda ?
Personal, for
and foreach
, this I know. The question would be with lambda . That did not work that way. The goal of this is just learning.
var teste = l in vlstMinhaEntidade...
The above gives error at all.
So you're giving it a go:
vbolErroDocTorObrigatorio = vlstDados.ForEach(
l => l.IcObrigatorio == 0 && string.IsNullOrEmpty(l.DsPathDocumento)
);