Ambiguous extension method

前端 未结 4 1106
太阳男子
太阳男子 2020-12-28 13:13

I am making the following call to an extension method:

database.ExecuteScalar(command).NoNull(string.Empty);

I get an error t

4条回答
  •  猫巷女王i
    2020-12-28 13:46

    I would strongly suggest that you rename one of the extension methods. Depending on what else you do, you could possibly just remove the using directive for one of those namespaces, but that won't help if you need both namespaces for other things. (This leads to a suggestion to put extension methods in their own namespace, of course.) Renaming is likely to simplify things in general though.

提交回复
热议问题