LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constructor and static function in C# DLL

I am calling a .NET DLL written in C# in LabVIEW.  I was trying to call a fucntion in the DLL with the constructor, but it turnes out that it is a static function, so I can't use a constructor.  Can someone explains these terminolgies to me?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 2
(4,522 Views)

This probably belongs in the LabVIEW forum, not the BreakPoint forum...

 

A static function is a function that "belongs" to the class, not to the instance of the class, i.e., the object created by the constructor. To call a static function you simply use the Invoke Node directly. Right-click on it and select the .NET class that it should use. Once you do this, left-clicking on the method name will display the functions. The static ones are the ones that start with [S]. In C# this is equivalent to saying <className>.<staticFunctionName> (e.g., Math.Abs).

Message 2 of 2
(4,504 Views)