首先,我是C#的初学者。问题..执行此代码时,它返回一些字符串和数字形式的值,例如:“Hello World,我的名字是Jon,来自行星10230120”我怎样才能选择要保存到查询的内容?假设我只想将“10230120”保存到查询
我到目前为止的代码:
GetRequest("mylink");
Console.ReadKey();
}
async static void GetRequest(string url)
{
using (HttpClient client = new HttpClient())
{
using (HttpResponseMessage respons = await client.GetAsync(url))
{
using(HttpContent content = respons.Content)
{
string mycontent = await content.ReadAsStringAsync();
Console.WriteLine(mycontent);