Skip to content


The PFS .NET API is a set of interfaces and classes for reading, modifying and creating DFS files.

The API is available through the namespace:


The assembly is available as a NuGet package at

The DHI.PFS NuGet package contains all components required to build and run applications for reading and writing PFS files on Windows. It contains a mix of .NET assemblies and native libraries.

Class Library Documentation

This chapter provide an overview of the functionality provided by the interfaces and classes. It does not in detail document every interface and class. Detailed documentation can be found in the class library documentation, which exists in the form of

The online class library documentation for PFS can be accessed via the MIKE SDK documentation index.

The assembly documentation file is located together with the assembly in the DHI.PFS NuGet package. The assembly documentation xml file is used by IDE’s like Visual Studio or SharpDevelop, making the documentation available within the IDE. The documentation is also available in the Visual Studio Object Browser, when loading the



Examples are provided on GitHub - GitHub examples

A number of C# examples are included in the file:



The PFSFile is used for reading and navigating the data in the PFS file. From a PFSFile object it is possible to get targets, sub-sections, keywords and parameters. It also enables all kinds of modifications to a PFS file.

  • Requesting and searching for sections and keywords by name and number.

  • Extracting values from parameters.

  • Modifying section and keyword names

  • Modifying parameter values

  • Inserting sections, keywords and parameters

  • Deleting sections, keywords and parameters.


The PFSBuilder is used for creating a new PFS file in a line-by-line manner.


The PFSTokenReader is a class for reading only of PFS files. It provides a low level reader for fast, forward-only access to PFS data, with minimal memory consumption while reading.

It is useful when handling large PFS files where a huge number of data needs to be extracted.