Answer the question
In order to leave comments, you need to log in
`
Error during serialization: An error occurred while reflecting type 'System.Collections.Generic.List`1[Orginizer.Diary]?
When serializing the Diary class:
public class Diary
{
[XmlElement]
public RichTextBox rtb { get; set; }
[XmlElement]
public DateTime dt { get; set; }
public static void Add(List list_diary,Label label1,RichTextBox richTextBox)
{
Diary diary = new Diary();
DateTime d = DateTime.Now;
DateTime.TryParse(label1.Content.ToString(),out d);
diary.dt = d;
diary.rtb = richTextBox;
//DataWorking.GetData(out list_diary, "diary.xml");
list_diary.Add(diary);
DataWorking.WriteData(list_diary, "diary.xml");
}
}
the following error occurs:
Who knows what could be the problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question