System.Data.Common.SqlBytesStorage.ConvertXmlToObject C# (CSharp) Метод

ConvertXmlToObject() публичный Метод

public ConvertXmlToObject ( string s ) : object
s string
Результат object
        public override object ConvertXmlToObject(string s)
        {
            SqlBinary newValue = new SqlBinary();
            string tempStr = string.Concat("<col>", s, "</col>"); // this is done since you can give fragmet to reader
            StringReader strReader = new StringReader(tempStr);

            IXmlSerializable tmp = newValue;

            using (XmlTextReader xmlTextReader = new XmlTextReader(strReader))
            {
                tmp.ReadXml(xmlTextReader);
            }
            return (new SqlBytes((SqlBinary)tmp));
        }