» Calling External Code » .NET Assemblies » Instantiating .NET Objects
The .NET Constructor Node (Functions Palette » Connectivity » .NET » Constructor Node) allows you to specify the class that you want to instantiate and its owning assembly. You can pick from the available constructors of the class, and the node will give you a reference to the .NET object. This reference can be wired to .NET Property Nodes and .NET Invoke Nodes to access properties and methods of the class.
For example, to create an instance of System.Timers.Timer, you would:
When you are done using a .NET Object, you should destroy it to free up any resources associated with the object. To destroy a .NET object, wire in the object reference to the Close Reference VI (Functions Palette » Connectivity » .NET).
The following examples install with LabVIEW:
Calculator VI: labview\examples\comm\dotnet\Calculator.llb
SimpleTaskMonitor VI: labview\examples\comm\dotnet\SimpleTaskMonitor.llb
Community Example: Calling .NET Assemblies from LabVIEW