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

RFC_ERROR_SYSTEM_FAILURE with SAP ECC 6 Unicode

C# System.Data.Common DbCommand and getting Datasets from Oracle