/// <summary>
        /// Metodo para serializar una Lista de objetos en un XML simple
        /// </summary>
        /// <param name="thelist"> la lista de tipo List<T> </param>
        /// <returns></returns>
        public static string List2XML(IList thelist)
        {
            string xml = "";

            try
            {


                XmlSerializer xmlSer = new XmlSerializer(thelist.GetType());
                StringWriterWithEncoding sWriter = new StringWriterWithEncoding(Encoding.UTF8);

                XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();
                xsn.Add(String.Empty, "");

                xmlSer.Serialize(sWriter, thelist, xsn);

                xml = sWriter.ToString();

              



            }
            catch (Exception e)
            {
               
            }

            return xml;
        }
        /// <summary>
        /// Metodo para serializar una Lista de objetos en un XML simple
        /// </summary>
        /// <param name="thelist"> la lista de tipo List<T> </param>
        /// <returns></returns>
        public static string List2XML(IList thelist)
        {
            string xml = "";

            try
            {
                XmlSerializer            xmlSer  = new XmlSerializer(thelist.GetType());
                StringWriterWithEncoding sWriter = new StringWriterWithEncoding(Encoding.UTF8);

                XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();
                xsn.Add(String.Empty, "");

                xmlSer.Serialize(sWriter, thelist, xsn);

                xml = sWriter.ToString();
            }
            catch (Exception e)
            {
            }

            return(xml);
        }