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

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'