Zdravim chci serializovat dokument pomoci XML
public class Data
{
public string post;
public string get;
public Data(string post_, string get_)
{
post = post_;
get = get_;
}
}
[Serializable]
[XmlRoot("all")]
public class all
{
[XmlArray("1")]
public ArrayList jedna { get; set; }
[XmlAttribute("2")]
public string dva { get; set; }
[XmlAttribute("3")]
public string tri { get; set; }
}
class Program
{
static void Main(string[] args)
{
all every = new all() { jedna = poledata, dva = "HODNOTA2", tri = "HODNOTA3" };
XmlSerializer serializer = new XmlSerializer(typeof(all));
TextWriter textWriter = new StreamWriter(DialogSave.FileName.ToString());
serializer.Serialize(textWriter, every);
textWriter.Close();
}
}
ArrazList data naplnuji prvky set a get. Pote chci serializovat, ale nahle mi program spadne a napise chybovou hlasku: There was an error generating the XML document. Dekuji za rady