Would it be possible to add Convert.ToXXX() calls and .ToString() method
invokations for certain valuetype/string mismatches? I end up doing a
lot of these by hand for things like DataRow operations. It would nice
if Resharper could offer a more functional conversion from string to
Int32 and vice versa, as an example.
int myValue = 3;
string s = myValue;
^-- should suggest "Convert.ToString() and myValue.ToString()"
string s = "3";
int myValue = s;
^-- should suggest "Convert.ToInt32()"
Other fixes might include "Enum.Parse" calls:
string s = "MyEnum";
MyEnum xx = s;
^-- should suggest Enum.Parse()
Most conversions have a "well-known" framework method to convert them.
It would be nice if Resharper exposed these.