3 ms·
Not for complete but for beginners lightly familiar with programming it is overall not difficult to teach the basics, often easier than to stubborn seniors who
by neonsunset 2y ago
Not for complete but for beginners lightly familiar with programming it is overall not difficult to teach the basics, often easier than to stubborn seniors who want to do it their way only :)
var start = "commtext c00\">";
var end = "</div>";
using var http = new HttpClient();
var page = await http.GetStringAsync("https://news.ycombinator.com/item?id=41425416");
var commStart = page.IndexOf(start) + start.Length;
var commEnd = page.IndexOf(end, commStart);
Console.WriteLine(page[commStart..commEnd]);
or
var host = WebApplication
.CreateBuilder()
.Build();
host.MapGet("/", () => "Hello World");
host.Run("http://+:8080");