SqlParameter constructor compiler overload choice
问题 When creating an SqlParameter (.NET3.5) or OdbcParameter , I often use the SqlParameter(string parameterName, Object value) constructor overload to set the value in one statement. However, when I tried passing a literal 0 as the value parameter, I was initially caught by the C# compiler choosing the (string, OdbcType) overload instead of (string, Object) . MSDN actually warns about this gotcha in the remarks section, but the explanation confuses me. Why does the C# compiler decide that a