Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# MemoryMappedFile in .net 3.5

I need to use MemoryMappedFile class in .net 3.5... is there any way to find the code of the classes used in .net 4.0 and create to use in .net 3.5? thanks in advance

like image 820
ghiboz Avatar asked Oct 24 '25 23:10

ghiboz


2 Answers

If you need memory mapped files in .NET 3.5, you could also write your own wrapper around the respective Win32 methods from scratch. This might take a bit more effort, but it avoids any licensing issues.

like image 90
Malte Clasen Avatar answered Oct 26 '25 14:10

Malte Clasen


.NET 4 uses a whole new CLR, and I wouldn't be at all surprised to find that enough had changed under the hood to make this basically infeasible.

Basically, you should be working to use a version of .NET that supports the functionality you need - any workaround you find is very likely to cause hard-to-diagnose issues, IMO.

like image 20
Jon Skeet Avatar answered Oct 26 '25 15:10

Jon Skeet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!