It looks like min is 128 and default is 4096, see
https://referencesource.microsoft.com/#mscorlib/system/io/streamreader.cs,b5fe1efcec14de32
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
StreamReader(Stream, Encoding, detectEncodingFromByteOrderMarks, bufferSize)
Anyone knows in VB.net under .net framework 4.0 full for WinForms, what's the default and minimum buffer size (in integer) of the above StreamReader Constructor?
Thanks for advise.
It looks like min is 128 and default is 4096, see
https://referencesource.microsoft.com/#mscorlib/system/io/streamreader.cs,b5fe1efcec14de32
Hi @StewartBW ,
In VB.NET under .NET Framework 4.0 for WinForms, the StreamReader
constructor has a default buffer size of 1,024 bytes (which is 1 KB).
The minimum buffer size you can specify for the StreamReader
constructor is 128 bytes.
Best Regards.
Jiachen Li
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.