07-31-2009 11:52 AM
Solved! Go to Solution.
08-03-2009 09:20 AM
You will need to fully-qualify the type name when you delcare it in code.
For example, in C#, this would look like:
NationalInstruments.NI4882.Device myDevice = new NationalInstruments.NI4882.Device(1, 1);
In VB.NET, this would look like:
Dim myDevice As New NationalInstruments.NI4882.Device(1, 1)
David Rohacek
National Instruments
08-05-2009 09:58 PM
The reason for this is because both the DAQmx and NI4882 namespaces define the Device class.
So, when you reference 'Device' in your code, .NET does not know which class to use, the DAQmx one or the NI4882 one. This is why you have to provide the fully qualified name as David explained if you have both namespaces referenced in your code.
Alternatively, if you don't use DAQmx in your project, removing the using NationalInstruments.DAQmx line from your code should also resolve the issue because then .NET will only be able to see the NationalInstruments.4882 namespace's Device class.
Hope this helps!