Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to get the character length of a in my cs page..
Posted
Updated 21-Sep-11 22:22pm
v2
Comments
Sunasara Imdadhusen 22-Sep-11 3:24am    
do you want to get length of string?
hitech_s 22-Sep-11 4:05am    
is 'a' your string variable?
or you are asking for ascii value for a ?
what you want exactly..
André Kraak 22-Sep-11 4:25am    
Please share any relevant code with us, seeing the code might us help understand the problem your are facing.

If you wish to change your question use the Improve Question button.
RaviRanjanKr 22-Sep-11 4:26am    
Not clear. please be more clear while asking question. we need more information.

1 solution

if you want to check a leagth of you character array then simply write this..

C#
char test = 'a';
int i = ((string)(test.ToString())).Length;

char[] test = new char[3];
test[0] = 'a';
test[1] = 'b';
test[2] = 'c';
int l = test.Length;


or any thing else then please show your code, so it is clear that what you actually want...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900