System.Xml.Schema.Datatype_unsignedByte.TryParseValue C# (CSharp) Méthode

TryParseValue() private méthode

private TryParseValue ( string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, object &typedValue ) : Exception
s string
nameTable System.Xml.XmlNameTable
nsmgr IXmlNamespaceResolver
typedValue object
Résultat System.Exception
        internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
        {
            Exception exception;

            typedValue = null;

            exception = s_numeric10FacetsChecker.CheckLexicalFacets(ref s, this);
            if (exception != null) goto Error;

            byte byteValue;
            exception = XmlConvert.TryToByte(s, out byteValue);
            if (exception != null) goto Error;

            exception = s_numeric10FacetsChecker.CheckValueFacets((short)byteValue, this);
            if (exception != null) goto Error;

            typedValue = byteValue;

            return null;

        Error:
            return exception;
        }
    }
Datatype_unsignedByte