The .NET driver API provides an interface to communicate with NI hardware from Visual Studio. NI offers native .NET APIs and .NET Source Code Wrapper APIs.
The native .NET APIs have an object-oriented design and follow .NET Framework idioms. They include documentation of the public interface, conceptual documentation, and examples written in VB.NET and C#.
The .NET source code wrapper APIs are C# and VB.NET source files that provide a thin .NET interface to a C API. NI created source code wrapper APIs to quickly provide rudimentary .NET support before native .NET APIs could be developed.
NI recommends you use native .NET APIs when available because they are easier to program against and provide a better installation, maintenance, versioning, and configuration management experience. Choose source code wrapper APIs only when a native .NET API is not available or when you have already built a system using source code wrappers before native .NET APIs were available.
NI plans to continue to support and maintain native .NET APIs. NI plans to discontinue updates to .NET wrapper APIs.
The following table provides a feature comparison between NI native .NET APIs and .NET source code wrapper APIs
||Native .NET API
||.NET Source Code Wrapper API
||Flat, single-layer, C-like
||Method and property names follow Measurement Studio and IVI guidelines
||Method and property names are mapped from C names
||Detailed IntelliSense help. .NET function reference, concept topics, and .NET to C mapping topic
||Limited IntelliSense help, with text copied directly from the C function reference
||Compiled .NET assembly (DLL) targeting specific .NET framework
||C# and VB.NET source code
||Installer installs assemblies, help files, and examples into Program Files for development and assemblies into Global Assembly Cache for execution
||No installer; source code in .zip file
||Several examples demonstrating key concepts
|Warning and exception handling
|| Raises events for warnings. Throws appropriate IVI and .NET Framework exceptions.
||Returns warning code from functions. Throws a single exception.
|Compatibility with Measurement Studio
||Measurement Studio defined .NET datatypes, such as waveforms and precision timing
||Basic datatypes, directly translated from C API