Exemplo n.º 1
0
        public static object LoadObject(Type objectType, string filePath, out string resultText)
        {
            object result = null;

            XmlSerializerExt xs = new XmlSerializerExt(objectType);
            using (XmlTextReader xtr = new XmlTextReader(filePath))
            {
                result = xs.DeserializeWithEvents(xtr);
                resultText = xs.DeserializationResultText;

            }

            return result;
        }