While developing my application i came across some comparison stuff here was it:
string str = \"12345\"; int j = 12345; if (str == j.ToString())
Semantics are a little different. "01" == 1.ToString() is false, 1 == Convert.ToInt32("01") is true.
"01" == 1.ToString()
1 == Convert.ToInt32("01")
If the parsing can go wrong (The string isn't a valid number) then Int32.TryParse is faster than to use Convert.ToInt32().
Int32.TryParse
Convert.ToInt32()