Enjoy Life

A Ryan Gene Blog!

Tuesday, August 29, 2006

[Code]C# Capital Initial首字母大写

碰巧用到,记录一下:


using System.Globalization;
using System.Threading;

CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
TextInfo textInfo = cultureInfo.TextInfo;

Console.WriteLine(textInfo.ToTitleCase(title));
Console.WriteLine(textInfo.ToLower(title));
Console.WriteLine(textInfo.ToUpper(title));

posted by Ryan Gene at 5:51 PM

0 Comments:

Post a Comment

<< Home

Name:
Location: Shanghai, Shanghai, China

Powered by Blogger
Powered by Writely

Add to Google

Site Feed