My update Update.Check() method throws this error: 'string' does not contain a definition for 'Get'
.
Googled for hours, but couldn't figure it out.
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace MyTestProgram
{
public class Update
{
public static void Check()
{
string result = Task.FromResult(string.Get.Result);
Console.WriteLine(result);
}
private static async Task<string> Get()
{
var client = new HttpClient();
return await client.GetStringAsync("http://localhost/?update=val");
}
}
}
Using .NET Framework 4.5