How can I read a line from a Stream to a ReadOnlySpan<char>?

Viewed 709

I am experimenting with reading data from a Stream (in my case is a StreamReader) to a ReadOnlySpan<char>.

When the lines have fixed length there is no problem but when they have variable length I don't know how it can be done.

I would like to know if there is a possibility to read a line to a ReadOnlySpan<char> in some way.

0 Answers
Related