From 09:00 PM Friday, August 7 - 10:30 AM CST Saturday, August 8, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Table Of Contents

Considerations for Including .NET Code in a LabVIEW NXG Application

Last Modified: February 19, 2020

You can call .NET code from your LabVIEW NXG application. However, some .NET features and functionality either work differently or do not have direct counterparts in LabVIEW NXG.

To successfully include .NET code in your application, learn which differences may affect your existing .NET code.

Generic .NET Classes and Methods

LabVIEW NXG cannot create generic .NET classes or call generic .NET methods. However, you can call .NET methods that use generic classes or methods internally.

Static .NET Properties and Methods

You can use static .NET properties and methods in LabVIEW NXG. Static .NET methods do not include an input for a .NET class reference and display a different icon from non-static methods. Static .NET property nodes do include an input for a .NET class reference, but they only use the type information at run time. You can combine static and non-static properties on the same property node.

Dynamic Keywords

LabVIEW NXG requires .NET objects to have a defined type in order to display available methods. Therefore, although you can call .NET methods that return a dynamic data type, you cannot use the returned data to call other methods.

spd-note-note
Note  

As an exception, LabVIEW NXG can successfully call assemblies that use dynamic data types internally.

Default Values for Optional Parameters

.NET assemblies may include methods that allow optional parameters, which have default values that the method uses if the caller does not specify a value for the parameter. However, when you call a method with an optional parameter from LabVIEW NXG, LabVIEW NXG always passes the default value for the data type of the parameter instead of letting the method use its own pre-configured defaults.


Recently Viewed Topics