I donβt think you need only LINQ for this.
Take a look at this example.
string sampleString = "this is a title"; CultureInfo currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture; TextInfo currentInfo = currentCulture.TextInfo; sampleString = currentInfo.ToTitleCase(sampleString);
TextInfo.ToTitleCase Method
So, in choosing LINQ, you can use something like
CultureInfo currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture; TextInfo currentInfo = currentCulture.TextInfo; List<string> testList = new List<string> { "foo", "bAr", "fOO bar Test tAdA" }; var correct = from s in testList select currentInfo.ToTitleCase(s);
source share