Q: There was an error reflecting type 'System.Collections.Generic.List` I need for project in my study save to file serialize object list. I first time using serialize. I read many examples and i can't resolve my error. I getting error 'There was an error reflecting type 'System.Collections.Generic.List`'
This is my class to serialize 
namespace projekt2
{
    [Serializable()]
    public class wezel : ICloneable
    {
        public Label text {get;set;}
        public Ellipse el {get;set;}
        public int id {get;set;}
        public wezel(Label text, Ellipse el, int id)
        {
            this.text = text;
            this.el = el;
            this.id = id;
        }
        public wezel()
        {
        }
        public object Clone()
        {
            return this.MemberwiseClone();
        }

    }
}

List declaration
public List <wezel> w= new List<wezel>();

And function what i try serialize
public void SerializeToXML(MainWindow window, Canvas canvas, int dpi, string filename)
        {
            string mystrXAML = XamlWriter.Save(canvas);
            FileStream filestream = File.Create(filename);
            StreamWriter streamwriter = new StreamWriter(filestream);
            streamwriter.Write(mystrXAML);
            streamwriter.Close();
            filestream.Close();
            XmlSerializer serializer = new XmlSerializer(typeof(List<wezel>)); 
            TextWriter textWriter = new StreamWriter(@"wezly.xml");
            serializer.Serialize(textWriter, w);
            textWriter.Close(); 
        }

Some one can now how to fix this error and serialize this list of object wezel?
