public void FromFile() { using (FileStream fs = new FileStream(@"C:\Users\Юлия\Desktop\algo\file.json", FileMode.OpenOrCreate)) { CommentManager comment = await JsonSerializer.DeserializeAsync <CommentManager>(fs); } }
public void AddComment() { CommentManager newComment = new CommentManager(); // text = Form2.textBox1.Text; // date = DateTime.Now; comments.Add(newComment); }