阿宽

Nothing is more powerful than habit!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

c# 首字母大写 方法

Posted on 2011-06-20 13:46  宽田  阅读(14500)  评论(1编辑  收藏  举报

方法1:

s.Substring(0,1).ToUpper()+s.Substring(1);

 

方法2:

= System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(s)