Another method is to create a Interop interface to the DLL in C#. Not trivial but definitely doable.
Of course newer NI-845x driver versions such as 21.3 also support native .Net interfaces that can be called from a C# application with little effort.
https://www.ni.com/pdf/manuals/375534f.htm
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390