I'm able to write the data from buffer to one single file continuously .But i want write the data into multiple files sequentially one after the other after reaching some stream length and also after some file no. equal to 10 again it should write to first file and so on .what i tried is given below .i hope you people will help me to sort out of this problem.
while (true)
{
int filenumber = 0;
const int sizeLimitInByte s = 360960 * 16;
using (var fs = new FileStream("C:\ \user\\mady\\de sktop\\filenum. txt", FileMode.Create , FileAccess.Read Write))
{
while (true)
{
fs.Write(xBufs[k], 0, xBufs[k].Length);
index++;
Offset += len;
EndPoint.BeginD ataXfer(ref cBufs[k], ref xBufs[k], ref len, ref oLaps[k]);
if (fs.Length >= sizeLimitInByte s)
{
}
}
}
}
while (true)
{
int filenumber = 0;
const int sizeLimitInByte s = 360960 * 16;
using (var fs = new FileStream("C:\ \user\\mady\\de sktop\\filenum. txt", FileMode.Create , FileAccess.Read Write))
{
while (true)
{
fs.Write(xBufs[k], 0, xBufs[k].Length);
index++;
Offset += len;
EndPoint.BeginD ataXfer(ref cBufs[k], ref xBufs[k], ref len, ref oLaps[k]);
if (fs.Length >= sizeLimitInByte s)
{
}
}
}
}