ASP.NET Core | Making a request synchronously

using (var netClient = new System.Net.Http.HttpClient()) { var response = netClient.GetAsync(“https://example.com”).Result; if (response.IsSuccessStatusCode) { var responseContent = response.Content; string responseAsString = responseContent.ReadAsStringAsync().Result; Console.WriteLine(responseAsString); } }

ASP.NET – Format string by CultureInfo

C# var my_date = DateTime.Now; var my_culture = System.Globalization.CultureInfo.CreateSpecificCulture(“it-IT”); var my_string = my_date.ToString(“d MMMM”, my_culture); Console.WriteLine(my_string); VB.NET Dim my_date = DateTime.Now Dim my_culture = System.Globalization.CultureInfo.CreateSpecificCulture(“it-IT”) Dim my_string = my_date.ToString(“d MMMM”, my_culture) Console.WriteLine(my_string)