The call is ambiguous between single method i.e extension method

前端 未结 6 938
悲&欢浪女
悲&欢浪女 2021-02-12 04:06

I have an extension method like

public static class Extension
{
    public static string GetTLD(this string str)
    {
        var host = new System.Uri(str).Hos         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-12 04:28

    My issue was similar to what shashwat describes. In my case I put the code file in the App_Code dir, but in order to get intellisense, I set the file itself to compile which likely means that the file was getting compiled at both runtime and compile time. I just moved the file out of App_Code.

提交回复
热议问题