取消
显示结果 
搜索替代 
您的意思是: 

.net NullReferenceException When Trying to Add an Object to a Collection

已解决!
转到解答

Hi,

 

I am trying to implement the following C# code natively in LabVIEW 2009f3.

 

VptSessionParamList test = new VptSessionParamList("TSDevMasterParseDeviceResponse"); test.Add("00262D65 Y 0F Y C2N-MNETGW 2-Way Gateway [v2.999.0012.Quick_FIX, #00262D65]"); string t = test.ToString();

 

When I try to use the Add method in LabVIEW, it looks like the reference becomes a null reference causing the rest to fail.  Below is how I implemented it in LabVIEW.

VptSessionParamList_labview_implementation.PNG

 

Is there a way to fix this?

 

Thanks
John

0 项奖励
1 条消息(共 2 条)
2,567 次查看
解答
已被主题作者 jpsc 接受
Nevermind, I found "To .Net Object.vi" in the .net pallet. 🙂
0 项奖励
2 条消息(共 2 条)
2,564 次查看