Advertisement
mvassilev

Untitled

Feb 25th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. // Specify the data source.
  2. int[] scores = new int[] { 97, 92, 81, 60 };
  3.  
  4. // Define the query expression.
  5. IEnumerable<int> scoreQuery =
  6.     from score in scores
  7.     where score > 80
  8.     select score;
  9.  
  10. // Execute the query.
  11. foreach (int i in scoreQuery) {
  12.     Console.Write(i + " ");
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement