我正在尝试将所有列表项转换为 TitleCase。我认为 TitleCase 会很简单,但它似乎与大写或小写不一样。有任何想法吗?这适用于上下:
列表 myList = new List() { "abc", "DEF", "Def", "aBC" };
myList = myList.ConvertAll(x => x.ToUpper());
myList = myList.ConvertAll(x => x.ToLower());
但这些都不起作用:
myList = myList.ConvertAll(x => x.ToTitleCase());
myList = myList.ConvertAll(x => x.TitleCase());