I have a KeyValueStore that contains custom type
Type LocCfg(Password As String, Confirmed As Boolean, Cdate As Long)
Now I need to add a field and I modify like this
Type LocCfg(Password As String, Confirmed As Boolean, Cdate As Long, NewField as int)
I publish on the store the new app
First time the new app is run, the existing kvs does not have the NewField, so I'm trying to do like this
Dim par As LocCfg=KvsLocCfg.Get(key1)
if par.NewField=null or par.NewField="" then par.NewField=0
dim x as int=par.NewField
But it generate a "null" error
Also adding a Try-Catch does not work
Dim par As LocCfg=KvsLocCfg.Get(key1)
Dim x as int
try
x=par.NewField
catch
x=0
End Try
Which is the correct way to manage this ?