Hi Mike,
From what I know, Convert.ToString attempts to cast the argument to
IConvertible first and then to invoke ToString on the IConvertible. If this
attempt fails, then Convert.ToString invokes the ToString() method directly
on the argument. This is at least true for the overload accepting the
argument of type Object. For overloads accepting arguments of known types
such as Byte, there is no difference between Convert.ToString and the
ToString() method.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"Mike" <no****@nospam.com> wrote in message
news:Od**************@tk2msftngp13.phx.gbl...
Hi,
I was wondering whether a difference existed between the Convert.ToString()
method and the method ToString() that is sometimes available in some
classes. Is one method preferred over another?
Thanks.
Mike