4
O linq é mais eficiente do que parece na superfície?
Se eu escrever algo como isto: var things = mythings .Where(x => x.IsSomeValue) .Where(y => y.IsSomeOtherValue) É o mesmo que: var results1 = new List<Thing>(); foreach(var t in mythings) if(t.IsSomeValue) results1.Add(t); var results2 = new List<Thing>(); foreach(var t in results1) if(t.IsSomeOtherValue) results2.Add(t); Ou existe alguma mágica embaixo das cobertas que …