Industrial Data Science
in C# and .NET:
Simple. Fast. Reliable.

ILNumerics - Technical Computing

Modern High Performance Tools for Technical

Computing and Visualization in Industry and Science

HDF5 Compound Type Datasets and ILNumerics.Array of struct (C#) - using low level HDF.PInvoke API

This example demonstrates the creation of a custom C# struct and how to store it into a HDF5 file, using ILNumerics and HDF.PInvoke. The struct serves as element type T in regular Array instances. However, since in version 5.5 ILNumerics.IO.HDF5 does not yet support compound data types _directly_ we must use the low level API (HDF5.PInvoke) in order to create the datatypes and the dataset in the HF5 file. Also, we must manually write and read the data from/into ILNumerics.Array of appropriate sizes.

This example requires the ILNumerics.IO.HDF5 package.

Read the Getting Started Guide on ILNumerics with .NET Core projects:Link.

Last modified: August 25 2021 18:29

Download ZIP


All Examples