Is there a limit on the maximum number of files that can be opened in C#?

.net, c#, file, file-io

Solution

The upper limit on files opened by .NET is governed by the limit imposed on the Win32 API CreateFile, which is 16384.

Problem

I am making an app and it needs to open at least 676 files simultaneously to a maximum of 1400 files. I will be writing to these files using the `StreamWriter` Class and reading the data using `StreamReader` Class. So, is there a maximum limit on the no of files that can be opened simultaneously for reading or writing in C# just like VC++ as described in the following link. Is there a limit on number of open files in Windows.

Original source

Related problems