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

前端 未结 6 927
悲&欢浪女
悲&欢浪女 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:27

    I had the same problem. After some research and experimenting, I found that (for whatever reason) visual studio doesn't like extension methods in the App_Code folder. Easiest solution I found was to just change the name of the folder.

提交回复
热议问题