How can I save some user data locally on my Xamarin Forms app?

前端 未结 5 661
太阳男子
太阳男子 2020-12-12 15:29

I have a simple Xamarin Forms app. I\'ve now got a simple POCO object (eg. User instance or an list of the most recent tweets or orders or whatever).

Ho

5条回答
  •  爱一瞬间的悲伤
    2020-12-12 16:24

    If it's Key value(one value) data storage, follow below code

    Application.Current.Properties["AppNumber"] = "123"

    await Application.Current.SavePropertiesAsync();

    Getting the same value

    var value = Application.Current.Properties["AppNumber"];

提交回复
热议问题