Hello All,

I am semi-new to C# and .NET, I am using MS VS 2005 (.NET 2.0)


I am trying to write a program that writes data to a file (a large file in chunks of 512K). The files could potentially be bigger than 2Gigs.

Problem #1: I have heard FileStream is not as efficient as using StreamWriter, is this true? how would i optimize the buffers to maximize performance.

Problem #2: I have not tested this yet, but I am pretty sure this is going to be a problem. In C#, an int is 2^32 or (approx 2Gigs). I am using FileStream.Write (byte[] array, int offset, int count) where offset and count are integers. Does this mean I can not write beyond 2gigs?

Thanks