Created
February 20, 2017 20:22
-
-
Save andresriancho/42f36c671c8bc30f42196ddb939645e9 to your computer and use it in GitHub Desktop.
linq-example.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
class app { | |
static void Main() { | |
string[] names = { "Burke", "Connor", "Frank", | |
"Everett", "Albert", "George", | |
"Harris", "David" }; | |
IEnumerable<string> query = from s in names | |
where s.Length == 5 | |
orderby s | |
select s.ToUpper(); | |
foreach (string item in query) | |
Console.WriteLine(item); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment