private static void GenericSerializeToFileTest()
        {
            Product product = CreateProduct();

            XmlGenericSerializer serializer = new XmlGenericSerializer();

            serializer.Serialize(product, "products.xml");
        }
        private static void GenericSerializeToTextTest()
        {
            Product product = CreateProduct();

            XmlGenericSerializer serializer = new XmlGenericSerializer();
            string xml = serializer.Serialize(product);

            Console.WriteLine(xml);
        }
 private static void GenericDeserializeFromTextTest()
 {
     string xml = "<Produkt color=\"Red\"><Id>1</Id><Name>Product 1</Name><UnitPrice>1.99</UnitPrice></Produkt>";
     XmlGenericSerializer serializer = new XmlGenericSerializer();
     Product product = serializer.Deserialize <Product>(xml);
 }
 private static void GenericDeserializeFromFileTest()
 {
     XmlGenericSerializer serializer = new XmlGenericSerializer();
     Product product = serializer.DeserializeFile <Product>("products.xml");
 }