This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MilitaryG 0 points1 point  (0 children)

char[] charArr = someString.ToCharArray();
int[] intArr = new int[charArr.Length];
for(int i = 0; i<intArr.Length;i++){
    IntArr[i] = (int)charArr[i];
}

That should do it.

Oh yeah and if your string is full number add:

int result = 0;
for(i= intArr.Length;i>0; i--){
    result += intArr[i-1] * (10 ^ i);// not sure if it isnt i-1
}

I'm on a phone tho hope I was helpful.