Is there a way to do null copy in .NET?

In Java, I would use the java.nio library and use FileChannel.transferTo() and FileChannel.transferFrom() . Is there something similar in (especially) C #, or will I have to load some insolvent .dll from somewhere? Google was not useful in this case.

Edit: I should note that I am targeting .NET 3.5.

+7
source share
1 answer

I think the best equivalent would be UnmanagedMemoryStream .

This class supports unmanaged memory access using an existing streaming model and does not require the contents of unmanaged memory to be copied to the heap .

Although I never had a reason for this, therefore, you cannot vouch for the appropriateness of this class (or use unmanaged code / memory in your script).

+2
source

All Articles