c# - How can I get conditional data with LINQ -
i have list called stacoverflows includes 1 item such isok, number.
stackoverflows
[0] -- isok = false; [0] -- number = 5768; [1] -- isok = true; [1] -- number = 4348;
how can number value (if there isok = true) isok = true linq?
should use any
?
yourcollection.where(i => i.isok).select(i => i.number).tolist()
Comments
Post a Comment