C# 我制作的网站应用程序的此api脚本不起作用

C# 我制作的网站应用程序的此api脚本不起作用,c#,api,C#,Api,我需要帮助 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace kbam_.API { class filea { public static string filea(string url) //this code right here {

我需要帮助

    using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace kbam_.API
{
    class filea
    {
        public static string filea(string url) //this code right here
        {
            string contents;
            var wc = new System.Net.WebClient();
            contents = wc.DownloadString(url);

        }


    }
}

是的,我得到了kesbook uk的授权可以使用它,我是它的所有者,所以我可以使用我想要的

如果您查询的是RESTful API,我建议使用nugget包,它更容易使用

不起作用怎么办?在没有解释或错误消息的情况下删除代码不太可能得到答案。我们不是读心术的。你的方法不会返回字符串。