Answer the question
In order to leave comments, you need to log in
Is it possible to save a list (List) in resources or in the application settings?
Good afternoon. Is it possible to save a list (List) in resources or in the application settings? That is List and for convenience would like to store the list. I know alternative options, but exactly how to save the List?
Answer the question
In order to leave comments, you need to log in
Option one is the easiest. In advance, in the networking, make a string type field for the list. Serialize the list in json and save it there. Well, when reading, you read the line and deserialize into your list.
var listStr = JsonConvert.SerializeObject(new List<Any>());
Properties.Settings.Default.MyList = listStr;
listStr = Properties.Settings.Default.MyList;
var list = JsonConvert.DeserializeObject<List<Any>>(listStr);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question