using System; using System.Collections.Generic; using System.Linq; public class Test { public static void Main() { List bunchOfStrings = new List(); bunchOfStrings.Add("This should not be at the top"); bunchOfStrings.Add("This should not be at the top either"); bunchOfStrings.Add("This should also not be at the top"); bunchOfStrings.Add("This *SHOULD be at the top"); bunchOfStrings.Add("This should not be at the top"); bunchOfStrings.Add("This should be *somewhere close to the top"); foreach (var str in bunchOfStrings.OrderBy(x => { var index = x.IndexOf("*"); return index < 0 ? 9999 : index; })) { Console.WriteLine(str); } } }