LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a .NET ReadOnlySpan

Solved!
Go to solution

@T. wrote:

 

Hello,

This is how I would have imagined it. Unfortunately, an error always comes out of the CreateInstance method.

 

 

T_0-1666011222050.png

Thanks...

 


The error tells you you're trying to create an instance of the interface and your type string does indeed have IList as the type. You should change it back to List.


___________________
Try to take over the world!
0 Kudos
Message 11 of 29
(1,036 Views)

Hello,

Now it works. I thank all who have supported me here super.

I will not be afraid to post my next problems here 😁

 

0 Kudos
Message 12 of 29
(1,021 Views)

@T. wrote:

Hello,

Now it works. I thank all who have supported me here super.

I will not be afraid to post my next problems here 😁


It could help others to post your solution...

0 Kudos
Message 13 of 29
(1,013 Views)

Hello,

As shown in this example, I manage to fill the list accordingly.

Have a nice day and thank you....

 

 

T_0-1666100625280.png

 

Message 14 of 29
(996 Views)

@T. wrote:

As shown in this example, I manage to fill the list accordingly.

Have a nice day and thank you....


Your first kudo for that...

 

Note you need to close the type reference used for the activator.

 

Note you need to close the NodeId reference.

 

Note you're recycling a reference to the list. It will grow 1 item for each call, forever. The list is not by wire...

 

These are references to the objects. If you don't need to refer to them anymore, close the reference. This won't (always) close the object. If the object is inserted in another object, the object will live on there.

0 Kudos
Message 15 of 29
(982 Views)

Hi,

It works fine in LV dev, but fail when compiled into a PPL.

Any idea ?

My guess is that System.Memory is not loaded by the PPL, which leads to a null reference outputed by the last GetType method (on the right side of the diagram).

Untitled.png

 

1.jpg

0 Kudos
Message 16 of 29
(820 Views)