09-09-2009 01:59 PM
Hey all,
I have the following line of code that's throwing an InvalidOperationException
TdmsProperty SampFreq =
new TdmsProperty(m_SampleFreq, TdmsPropertyDataType.Double, temp[2]);
I've verified that I'm calling the constructor correctly and it matches up with the convention shown in the TDMS API tutorial NI provides. The additional error message provided with the Exception Helper in VS.NET is:
The type parameter of the method does not match the data type of the TDMS property.
This makes very little sense to me. Is there another Type I'm supposed to use for this constructor? This is my first time using this API and the error is inconsistent with the documentation I've been able to find.
Thanks.
Solved! Go to Solution.
09-10-2009 10:46 AM
Hello nowellj,
This exception occurs when the third parameter is of a different data type than was is specified in the second parameter. What is the data type of your variable temp? If it is not an array of doubles, you will get the exception you reported. I tested your code snippet as follows, and did not see any exception:
Is this similar to what you are doing?
NickB
National Instruments
09-10-2009 10:49 AM