Please suggest me a good method that can be used to write a stream into a file.
I just need a simple c# function that can take a stream as input and do the job..
I need to do this for very large files ie files > 4GB.
Can this be done better using linq,extension methods etc?
Please provide me a good utility function that can also return the progress in percentage through yield.
Edit: I know about looping through a byte[] and writing it to a file. I’ve tried File.WriteAllBytes method. But,I’m just looking for a very nice way of doing it using linq,yield and extension methods.
Edit: Here is a utility function that should do the trick:
Update: Changed second parameter to file name