Lets say I have a string str = "012345";
I want to convert it to an array which would look like intAry = {0, 1, 2, 3, 4, 5};
. Any ideas?
I tried like this..
for (int i = 0; i < str.Length; i++)
{
intAry[i] = Convert.ToInt32(str[i]);
}
But what went to array are like 48, 49, etc. Which correct method should I use here?