⎕using←'System'
z←DateTime.Now
z
20/08/2014 12:56:57
z.GetType
System.DateTime
and then
)save myws
)load myws
You will now see the following:
z
(NULL)
z.GetType
VALUE ERROR
z.GetType
∧
Similarly
'andys'⎕ns''
andys.⎕using←'System'
andys.(sdt←DateTime.Now)
'parentns'⎕ns'andys'
parentns.andys.sdt
(NULL)
parentns.andys.sdt.GetType
VALUE ERROR
parentns.andys.sdt.GetType
∧
During a )SAVE entities in the workspace are serialised and the serialised data is then written to file. On )LOAD each entity is recreated from the serialised data. .NET offers serialise/deserialise methods for many (but not all) .NET objects. However, Dyalog does not make use of these methods.
The mechanisms for cloning namespaces (or for writing entities to and reading them back from component files) involve very similar techniques and thus suffer from the same limitation.
In these situations, Dyalog preserves the name or reference that was associated with the .NET object, but since the original object is no longer available, displays it as (NULL).
This behaviour may be changed in future releases of Dyalog.
[I have posted this in Microsoft.NET, but I intend to move this into the FAQ section in due course]