我无法弄清楚如何从同一命名空间中的不同类访问结果变量。
本质上,我想获取保存在“结果”中的字符串(位于下面的代码中),然后将其写入 SQL 数据库(我已经编写了这部分代码并且它正在工作 - 它包含在 public static void Main() 部分)
public class Thestring
{
public void Writejsontoconsole()
{
string url = "urlGoesIHere";
using (var client = new System.Net.WebClient())
{
string result = client.DownloadString(url);
}
}