سؤال

Trying to use StreamReader or similar from C# to read and write VERY LONG lines without the linebreak.

As I understand it, linebreak is still just 2 bytes (CR+LF) in a long bytearray called a file. At least thats how I am used to it in C/C++...

Is this the same for C# and .net or is there some maximum length for lines without a linebreak?

هل كانت مفيدة؟

المحلول

There are no specific limitations in .NET, but different ways of viewing long lines may give you problems, mostly related to performance. Try to open your long line file in notepad with word wrap on and it will choke on you. The same with multiline textboxes in .NET.

But for pure programmatic reading very long lines is no problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top