	    Product p = new Product();
            p.CategoryID = 100;
            p.discount = true;
            p.Name = "Product";
            p.ProductId = 20;
            p.price = 10.6F;
    //        Product.staticField = 10;
            //p.inner = new Inner();
   //         p.inner = new InnerChild();
 //           p.bitmap = new Bitmap(@"C:\xml\xmlimage.jpg");
 //           p.array = new float[2][];
//            p.array[0] = new float[10];


            StreamWriter sw = new StreamWriter(@"c:\xml\new.xml");

            XmlSerializer ser = new XmlSerializer(typeof(Product)});
            
            ser.Serialize(sw, p);
            
            sw.Close();           

[Serializable]
    public class Product
    {
        public int ProductId;
        public int CategoryID;
        public bool discount;
        public string Name;
        public float price;
        public static int staticField;
        private string privateString = "abcdefg";
        public Inner inner;
        [XmlIgnore]
        
        public Bitmap bitmap;

        [XmlElement]
        public byte[] XMLBitmap
        {
            get
            {

                TypeConverter converter = TypeDescriptor.GetConverter(typeof(Bitmap));
                return (byte[])converter.ConvertTo(bitmap, typeof(byte[]));
            }
            set
            {
                bitmap = new Bitmap(new MemoryStream(value));
            }
        }
       // [XmlArray]
        public float[][] array; //= { {1, 2, 3, 4, 5 },{ 1, 2, 3, 4, 5}};

        
        
    }

    [Serializable]
    public class Inner
    {

        public int a;
        public int b;
    }

    public class InnerChild : Inner
    {
        public int c;

        public int d;

    }