kvs.Initialize("value_store")
'Check if value_store contains a version key. If not, then it means this is a new file
If kvs.ContainsKey("version") = false Then
'Populate all the keys with default values
kvs.PutSimple("highscore",0)
kvs.PutSimple("difficulty","easy")
kvs.PutSimple("version",Application.VersionCode)
End If
'Check to see if value store version matches app version. Upgrade the keys if value_store
'is lower.
If kvs.GetSimple("version") < Application.VersionCode Then
kvs.PutSimple("NewFeature",10)
kvs.PutSimple("version",Apllication.VersionCode)
End If
'Now we can read in all the data and set the values
Dim HighScore As Int = kvs.GetSimple("highscore")
Dim Difficulty as String = kvs.GetSimple("difficulty")
'etc...