While developing my application i came across some comparison stuff here was it:
string str = \"12345\";
int j = 12345;
if (str == j.ToString())
Okay, i further move one step ahead and test in this way:
int j = 123;
for (var i = 0; i < iterationCount; i++)
{
j.ToString();
}
second one: string str = "123";
for (var i = 0; i < iterationCount; i++)
{
Convert.ToInt32(str);
}
In this case i found every time second one is performing a little better. In my case the number would be like 100000 only and not in the form of 100,000. Your comments on this test that i did in this post ??