using System.IO.MemoryMappedFiles; // Creating a new memory mapped file using (var mmf = MemoryMappedFile.CreateNew("MyMemoryMappedFile", 4096)) { // Do operations on the memory mapped file... // Dispose the memory mapped file mmf.Dispose(); }In this example, a new memory mapped file is created with the name "MyMemoryMappedFile" and a capacity of 4096 bytes. The using statement is used to automatically dispose of the memory mapped file after it has been used. Package library: System.IO.MemoryMappedFiles