While developing my application i came across some comparison stuff here was it:
string str = \"12345\";
int j = 12345;
if (str == j.ToString())
Well - performance should not be the only thing that matters.
You should ask whether you want to compare the actual value or only the representation of the number.
Take the following example: Does "00001" equal 1? If you want it to convert the string to int using Int.TryParse in combination and then compare them.
There might be other differences, too depending of the local settings. Maybe the user has set to format numbers like "1,000,000" - if you'd compare that string to 1000000.ToString() the result would be false.