Skip to content

Instantly share code, notes, and snippets.

@poyakarami
Created February 6, 2025 07:40
Show Gist options
  • Save poyakarami/5d91bd69a58f1a7cc0f6cc3e547d8297 to your computer and use it in GitHub Desktop.
Save poyakarami/5d91bd69a58f1a7cc0f6cc3e547d8297 to your computer and use it in GitHub Desktop.
// Data Source
List<int> intList = new List<int>
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
};
// Query
var Query = from x in intList // Data Source
where x > 5 // Condition
select x; // Selection
// result
foreach (var item in Query)
{
Console.WriteLine($"{item}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment