2

If I have a class containing of integers, strings and a Date, how should I go about creating, saving and displaying a new instance of this class in my ListViews?

I've used SharedPreferences before for saving local strings but is this possible with objects as well, or should I look into SQLlite?

Edit: Also, if SQLlite is needed, a little steer in the right direction would be appreciated.

1 Answer 1

1

You can still use preferences to save your objects but you need to serialize them into strings. And for later use you have to deserialize them from strings into your list of objects. This can easily be done with Json.net but I would recommend to use a database like SQLite. This would make it easy if new requirements like searching or object extension comes up.

A good entry into SQLite and Xamarin can be found here or here.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you! I'll look into SQLite then.
If my answer is the right one, I would kindly ask that you mark it as the answer. Thank you. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.