C
C#2y ago
Zerthz

Read a file line by line and append to a Blazor element

So I'm trying to create the same effect as a console executing and text scrolling up line by line pretty fast. But have it in the web via Blazor. Any idea how to make this effect? I'm not trying to have an interactive console just make the output look like one. When doing it in the console I use the StreamReader on the file, and use Console.Writeline(); not sure what I would do for blazor. Maybe still StreamReader and put it into a list that I do a foreach on?
1 Reply
ero
ero2y ago
no clue about blazor, but the streamreader thing is just unnecessary even for a console app you can just do File.ReadLines() and foreach over that