Chris <ch********@pandora.be> wrote:
what is the purpose of XmlConvert.ToString() ?
why not just use Convert.ToString() ?
e.g.
Int32 vInt32 = -2147483648;
string s1 = XmlConvert.ToString(vInt32);
string s2 = Convert.ToString(vInt32);
s1 and s2 result in the same string.
so what is the added benefit ?
XmlConvert is guaranteed to use the appropriate format for XSD types.
For instance, a DateTime will always be formatted with
yyyy-MM-ddTHH:mm:ss as the format string, regardless of the culture.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too