C# query List<Tuple> using LINQ -


i have list , need start reading when item1 great myvariable. can using loop , if statement can me using linq?

var listdate = new list<tuple<datetime, double>>();  foreach (var item in listdate) {     if (item.item1 > myvariable)          console.writeline(item); }    

the linq counterpart of if where:

ienumerable<tuple<datetime, double>> query = listdate.where(t => t.item1 > myvariable); 

you can use foreach-loop or method tolist consume query.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -