Hello nano2k,
use this one
using (FileStream stream = new FileStream(path, FileMode.Create, FileAccess.Write,
FileShare.Read))
{
stream.Write(bytes, 0, bytes.Length);
}
u can do in blocks, writing to file several times
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
n> On 31 Aug, 13:09, marss <marss...@gmail.com> wrote:
n>
>>> Hi
>>>
[quoted text clipped - 11 lines]
>> Regards,
>> Mykolahttp://marss.co.ua
n> Hi Mykola
n> Thanks for your response.
n> I'm using .NET Framework 1.1, so this method you suggested is not
n> available in my case.
n> The files I will create are far larger than you suggested in your
n> post. May be hundreds of megs, or even few gigs.
n> What you suggest is that I should create a file, than write the
n> amount
n> of bytes I need. Writing in one shot is not ok. It's not my desire to
n> allocate a huge buffer just to tranfer it to a file.
n> I'd rather write to file successively a reasonable sized buffer until
n> the desired size is reached.
n> This is my approach at the moment, but I thought that there should be
n> a another, more optimum, way to do it