string word = “销售额 ;
char c = word[0];
UnicodeCategory cat = char.GetUnicodeCategory(c);
if (cat == UnicodeCategory.OtherLetter)
{
//chinese char
}
else
{
//english char
}
Thursday, November 26, 2009
Check string contains chinese character or not in C#
Subscribe to:
Posts (Atom)