using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] names = { "A123123", "B123", "C123123", "E123", "W" };
IEnumerable<string> sequence = from n in names
where n.Length < 6
select n;
foreach (string name in sequence) {
Console.WriteLine("{0}", name);
}
}
}
|