LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing an internal .NET class with public constructors

Hi All,

Is there a way in LabVIEW to access the public constructors of an internal C# class?  For example, I have this bit of code inside a DLL (which I can't modify):

namespace IODevice_X
{
      class PlugIn : IOPlugin


Now within this (internal) PlugIn class I have several public constructors, but it seems that without explicitly writing "publig class PlugIn : IOPlugin" these constructors don't show up in the list inside LabVIEW 8.2.  The strange thing is that another programmer I'm working with is using the constructors from the PlugIn class DLL without any trouble.  Of course, he's creating his interface with C# and Visual Studio.

So the question is how (if possible) can I access public constructors within an internal class?

Thanks!
Ramirez Kleinigger Consulting, LLC
http://www.thinkrkc.com/
0 Kudos
Message 1 of 5
(3,461 Views)

Hi,

Which "list inside LabVIEW" are you referring to?  Are you trying to call the constructor through a Constructor Node or access it some other way?  Without explicitly labeling the class as "public", the class will not be exported, and will not be automatically populated in LabVIEW.  You might be able to manually type everything in, but it will depend on how you are trying to access this class.

Donovan
0 Kudos
Message 2 of 5
(3,401 Views)
Hi Donovan,

Thanks for your reply!  Yes, the list I'm referring to is the list of objects you get within the Constructor node.  Is there some other way to access .NET classes?  What do you mean by being able to "manually type everything in"?

Thanks,
Yohan
Ramirez Kleinigger Consulting, LLC
http://www.thinkrkc.com/
0 Kudos
Message 3 of 5
(3,395 Views)

Hi Yohan,

I forgot you were using the constructor and not a function.  No, there are not other ways to access the .NET classes.  The only thing I can think of that may let you access this constructor without changing the assembly itself is to create another assembly that is public and accesses the class you want.  Without the class being declared as public, you will not be able to access the constructor in LabVIEW.

Donovan
0 Kudos
Message 4 of 5
(3,372 Views)
Alright, well at least now I know!  Thanks for your help!
Ramirez Kleinigger Consulting, LLC
http://www.thinkrkc.com/
0 Kudos
Message 5 of 5
(3,357 Views)