Where with OrderBy
using System; using System.Collections.Generic; using System.Linq; public class MainClass { public static void Main() { string[] names = { "J", "P", "G", "Pa" }; IEnumerable<string> query = names.Where(n => n.Contains("a")) .OrderBy(n => n.Length) .Select(n => n.ToUpper()); } }