11-12-2019 01:19 PM
I have a .NET library with a function that takes in a List collection type as a parameter. Currently, I am using an action step with that .NET library as the assembly. Then I scroll down to the "Reference Generic Types" section to select System.Collections.Generic.List and creating an object reference to this list. I then use that object reference in the function call that takes the List type parameter.
Is there a simpler way to do this that would avoid this 2-step process without modifying the .NET library?
Solved! Go to Solution.
11-13-2019 08:21 AM
I see this is basically a follow up to your other post here: https://forums.ni.com/t5/NI-TestStand/Pass-NET-Class-Variables-to-a-Function/m-p/3990300#M60949
Unfortunately if you have a method that takes a .NET class object as a parameter (and assuming it does not accept null), you have to create the .NET object to pass in as a parameter in a separate step. It has nothing to do with the object being a collection or a generic though, the same would be true if it was a simple class object.
11-13-2019 08:25 AM
Yeah, it's kind of a follow up to that other question. I end up with 3-steps to do something fairly simple.
Well I kind of suspected that would be the case. Thanks for confirming that.