📜  JsonFileWrapper - 基本代码示例

📅  最后修改于: 2022-03-11 14:52:02.255000             🧑  作者: Mango

代码示例1
using MarcusMedinaPro.JsonFileWrapper;
// preparing the object
var file = new JsonFile>("Friends")
file.Load();
var People = file.Data;

// Now you can use your list as you want
People.Add(new Person { Name = "Adam", LastName = "West" });
People.Add(new Person { Name = "Bob", LastName = "Hoskins" });
People.Add(new Person { Name = "James", LastName = "Woods" });

// Save the list
file.Save();