I have a list of objects and I need to save that somewhere in my computer. I have read some forums and I know that the object has to be Serializable. But it wou
Serializable
You can use JsonConvert from Newtonsoft library. To serialize an object and write to a file in json format:
File.WriteAllText(filePath, JsonConvert.SerializeObject(obj));
And to deserialize it back into object:
var obj = JsonConvert.DeserializeObject(File.ReadAllText(filePath));