public static void SavePathConfigModel(PathConfig pathConfig) { string json = JsonConvert.SerializeObject(pathConfig); using (var fileStream = File.Open(ConfigPath, FileMode.OpenOrCreate)) { fileStream.Write(json); } }