.Net Framework®
Components and Resources
Articles for .Net Framework Developers
Featured Article

.Net Memory-Mapped Files

Featured Article

An article that introduces the .Net Framework implementation of memory-mapped files and demonstrates how to use them in your own applications and systems. The article discusses and demonstrates, with sample code, how use the types in the System.IO.MemoryMappedFiles namespace which was introduced in version 4.0 of the .Net Framework. The article concentrates on the use of memory-mapped files for Inter-Process Communication (IPC) and demonstrates how to pass/share structured data between two or more processes running on the same machine. The article includes coverage of the following topics:

  • Creating a new memory-mapped file
  • Opening an existing memory-mapped file
  • Synchronizing access to a memory-mapped file
  • Writing to a memory-mapped file
  • Reading from a memory-mapped file

The sample code used to illustrate the article provides a practical and real world example of the use of memory-mapped files in IPC and includes the MmFile class which encapsulates the functionality to create, open, write to and read from memory-mapped files in both a primary or source process and a secondary or destination process. The full sample source code is available in CSharp and Visual Basic as an optional download.

Finding Articles

Some of the more recent and/or popular articles available on the site are listed on the menu on the left of this page and can, therefore, be accessed directly. All articles are categorised and each category can be browsed by selecting the relevant category e.g. "How To", "Tutorials" etc from the menu. The category pages provide the title of each article together with a summary of the contents and a link to take you to the article's page. To browse through all of the available articles use the "All Categories" menu link. Within each category, articles with a similar subject or theme are grouped together to make it easier to locate an article on a specific topic and to display other similar articles that may also be of interest.

Provider Based Services

An article that demonstrates how to implement the Provider Design Pattern in a Windows Forms system. The provider model is used to develop a line of business system in which the client application is decoupled from the business logic and data services to create a system that is inherently flexible and easy to extend. The article demonstrates how to extend the ProviderBase base class to develop feature specific provider base classes and how to use them in a loosely coupled class library.

User Application Settings

An article explaining the concept of user application settings for .Net Framework Windows Forms applications. The article demonstrates how to create, serialize and deserialize application settings and how to develop your own custom application settings provider. The functionality of an application settings provider that supports the encryption of user application settings is discussed and you can also download the CSharp or Visual Basic source code for the settings provider.

Accessing The File System From .Net

An introduction to a series of articles that discuss and demonstrate, with sample code, how to access and manage file system objects from CSharp code. The series demonstrates how to access and manage file system drives, directories and files.

Using The Recycle Bin From CSharp

An article that demonstrates a managed code solution to using the system Recycle Bin from CSharp code. The article also demonstrates how to display progress reporting and an option to cancel when copying, deleting and moving folders and files.