A Query Using the Standard Dot Notation Syntax
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] names = { "A1", "B123", "C123123", "E", "W" };
IEnumerable<string> sequence = names
.Where(n => n.Length < 6)
.Select(n => n);
foreach (string name in sequence) {
Console.WriteLine("{0}", name);
}
}
}
Related examples in the same category