This question already has answers here:
How to capitalize the first character of each word, or the first character of a whole string, with C#?
                                
                                    (8个答案)
                                
                        
                                5年前关闭。
            
                    
我如何将每个单词的第一个字母大写
任何人?
我是新手,所以这将是很大的帮助。


  像大卫保罗这样的大卫保罗

最佳答案

var titleCaseStr = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(input);

关于c# - 每个单词的首字母大写,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22272122/

10-09 21:58