Wednesday, January 2, 2013

Count Characters in a String in C#.NET


String.Length will get the character count in a string.

string MyString = "abCDef123";
Response.Write(MyString.Length);

Output:
9

No comments:
Write comments
Recommended Posts × +