Hello,
I wonder if there could be faster way to convert a string to .Double() and Int32(),
then the methods below?
The code below takes approx: 7000 ms
//7000 ms
String number1 = "21.58";
String number2 = "21";
double getNum1 = 0;
int getNum2 = 0;
DateTime dt = DateTime.Now;
int runs = 85000 * 15 * 10;
for (int s = 0; s < runs; s++)
{
getNum1 = Convert.ToDouble(number1);
getNum2 = Convert.ToInt32(number2);
}
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2 - dt;
MessageBox.Show(diff.TotalMilliseconds.ToString());