09-20-2012 02:59 PM
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!
09-20-2012 09:50 PM
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).