///<summary>
        /// Method to convert a custom Object to XML string
        /// </summary>
        /// <param name="pObject">Object that is to be serialized to XML</param>
        /// <param name="objectType"></param>
        /// <returns>XML string</returns>
        public static String SerializeObject(Object pobject, Type objectType)
        {
            try
            {
                String            XmlizedString = null;
                MemoryStream      memoryStream  = new MemoryStream();
                XmlWriterSettings settings      = new XmlWriterSettings();
                settings.OmitXmlDeclaration = true;
                settings.Indent             = true;
                XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();
                namespaces.Add(string.Empty, string.Empty);

                //XmlSerializer xs = new XmlSerializer(objectType);
                XmlSerializer xs            = new XmlSerializerCache()[objectType];
                XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);

                xs.Serialize(xmlTextWriter, pobject, namespaces);
                memoryStream  = (MemoryStream)xmlTextWriter.BaseStream;
                XmlizedString = UTF8ByteArrayToString(memoryStream.ToArray());

                return(XmlizedString);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        ///<summary>
        /// Method to convert a custom Object to XML string
        /// </summary>
        /// <param name="pObject">Object that is to be serialized to XML</param>
        /// <param name="objectType"></param>
        /// <returns>XML string</returns>
        public static String SerializeObject(Object pobject, Type objectType)
        {
            try
            {
                String XmlizedString = null;
                MemoryStream memoryStream = new MemoryStream();
                XmlWriterSettings settings = new XmlWriterSettings();
                settings.OmitXmlDeclaration = true;
                settings.Indent = true;
                XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();
                namespaces.Add(string.Empty, string.Empty);

                //XmlSerializer xs = new XmlSerializer(objectType);
                XmlSerializer xs = new XmlSerializerCache()[objectType];
                XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);

                xs.Serialize(xmlTextWriter, pobject, namespaces);
                memoryStream = (MemoryStream)xmlTextWriter.BaseStream;
                XmlizedString = UTF8ByteArrayToString(memoryStream.ToArray());

                return XmlizedString;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        /// <summary>
        /// Method to reconstruct an Object from XML string
        /// </summary>
        /// <param name="pXmlizedString"></param>
        /// <param name="objectType"></param>
        /// <returns></returns>
        public static Object DeserializeObject(String pstring, Type objectType)
        {
            if (string.IsNullOrEmpty(pstring))
                return null;
            //XmlSerializer xs = new XmlSerializer(objectType);
            XmlSerializer xs = new XmlSerializerCache()[objectType];

            MemoryStream memoryStream = new MemoryStream(StringToUTF8ByteArray(pstring));
            XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);

            return xs.Deserialize(memoryStream);
        }
        /// <summary>
        /// Method to reconstruct an Object from XML string
        /// </summary>
        /// <param name="pXmlizedString"></param>
        /// <param name="objectType"></param>
        /// <returns></returns>
        public static Object DeserializeObject(String pstring, Type objectType)
        {
            if (string.IsNullOrEmpty(pstring))
            {
                return(null);
            }
            //XmlSerializer xs = new XmlSerializer(objectType);
            XmlSerializer xs = new XmlSerializerCache()[objectType];

            MemoryStream  memoryStream  = new MemoryStream(StringToUTF8ByteArray(pstring));
            XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);

            return(xs.Deserialize(memoryStream));
        }