将php转换为c#,curl转换为.net [关闭]

im trying to convert a PHP file to C#. the problem is that I don't know the equivalent .net commands to curl.

ob_start(); 
$ret = curl_exec($ch);
$content = ob_get_contents();
ob_end_clean(); 
$rescode = curl_getinfo($ch, CURLINFO_HTTP_CODE); 
curl_close($ch); 

i have tried to find all this information but wheat i have found is only fractured bits of code that are incompatible.

You do not specify anything, not even if it is a GET or POST, but this is an example from Postman using restsharp

var client = new RestClient("https://google.com");
var request = new RestRequest(Method.GET);
request.AddHeader("postman-token", "49bab31b-6be2-5862-e3ca-351cb8b35d86");
request.AddHeader("cache-control", "no-cache");
IRestResponse response = client.Execute(request);