what I have to use instead ToInt32
, to convert long string number value "10000000001" into integer, so this way is limited to a ten-digit number:
string str1 = "1000000000";
string str2 = "1000000000";
int a = Convert.ToInt32(str1);
int b = Convert.ToInt32(str2);
int c = a + b;
Console.WriteLine(c);
result:
2000000000
but how to convert if string number value is larger then ten-digit number:
string str1 = "10000000001";
string str2 = "10000000001";
to get result:
20000000002