C# - Convert ASCII to integer value


hi guys,

 

i have string array data looks number, in example:

[ '1', '0' ]

 

i need use these characters , make them calculation were integers.

i trying line below:

 

code snippet
int myint = convert
.toint16 (myarray[x])

 

sometimes integer value, others ascii code (49 instead of integer value of '1')

how can fix it?

thanks in advance,

aldo.

 

 

 

i it! since myarray char[] first have convert character string, integer:

code snippet

int = convert.toint16(convert.tostring(arraya[c1]));

 



Archived Forums V  >  Visual C# IDE



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to Share webservice object to all user

How to fix error Msg 1801, Level 16, State 3, Line 1