xui.SetDataFolder("kvs")
kvs.Initialize(xui.DefaultFolder, "kvs.dat")
kvs.Put("time", DateTime.Now)
'fetch this value
Log(DateTime.Time(kvs.Get("time")))
Log(kvs.Get("doesn't exist"))
Log(kvs.GetDefault("doesn't exist", 10))
'put a Bitmap
kvs.PutBitmap("bitmap1", xui.LoadBitmap(File.DirAssets, "smiley.gif"))
'fetch a bitmap
ImageView1.SetBitmap(kvs.GetBitmap("bitmap1"))
'remove the bitmap from the store
kvs.Remove("bitmap1")
'put an array with two custom types
kvs.Put("2 custom types", Array(CreateCustomType(1, "one"), CreateCustomType(2, "two")))
'get them
Dim mytypes() As Object = kvs.Get("2 custom types") 'the array type must be object or bytes