02-02-2016 09:49 AM
I'm attempting to create and then set the value of a .NET nullable System Int64 object but the property node "change to write" option is not selectable.
Is this a limitation, bug or design feature and are there any plans to address it?
Steps to Reproduce---V
Open attached VI.
View Block Diagram.
Go to method 1.
Right click on value and note that "Change to Write" is grayed out.
For those interested an alternative method has been provided to get around it.
02-02-2016 12:51 PM
@RVines wrote:I'm attempting to create and then set the value of a .NET nullable System Int64 object but the property node "change to write" option is not selectable.
Is this a limitation, bug or design feature and are there any plans to address it?
Steps to Reproduce---V
Open attached VI.
View Block Diagram.
Go to method 1.
Right click on value and note that "Change to Write" is grayed out.
For those interested an alternative method has been provided to get around it.
My guess is that this is an inconsistency across the 'support' for generic instance types in LabVIEW.
Nullable types in .NET are actually instances of the Nullable<T> struct which is by definition generic. You can tell that this is the case with the '1 at the end of the class, which is how the compiler has translated and named a new class from the generic type.
There is no definition for a nullable type instance of Int64 in mscorlib (ie. Nullable<Int64>); this type has to be created by a compiler specifically for an assembly or dynamically at runtime in the CLR via type creation. So you have to obtained a reference to this type from somewhere (that missing control perhaps).
02-02-2016 03:23 PM
Thanks for the background info. I originally obtained a reference to it by auto-generating a web service that I need to interface to.
NI, would you consider this a CAR?
05-19-2016 06:29 PM - edited 05-19-2016 06:39 PM
Nevermind. I think I realize my mistake.
05-19-2016 06:39 PM
Zombie poster alert.... This appears completely unrelated to the original subject.
An Int64 is not a TimeSpan. The error is telling you this (read the description). Also perhaps read this: https://msdn.microsoft.com/en-us/library/system.timespan.ticks(v=vs.110).aspx and https://msdn.microsoft.com/en-us/library/system.timespan(v=vs.110).aspx. It explains that a TimeSpan is an immutable object. If you want to create a TimeSpan then there are static methods of the struct to allow you to do this.
Perhaps you should explain whta you are trying to achieve.