Looking into the reflector, you can see the top ChangeType(object, Type, IFormatProvider), which is called under the cover:
public static object ChangeType(object value, Type conversionType, IFormatProvider provider)
{
IConvertible convertible = value as IConvertible;
if (convertible == null)
{
if (value.GetType() != conversionType)
{
throw new InvalidCastException(Environment.GetResourceString("InvalidCast_IConvertible"));
}
return value;
}
, , IConvertible, , .
, , , IConvertible, object.
LinqPad :
void Main()
{
var t = new Test();
var u = Convert.ChangeType(t, typeof(Test));
(u is IConvertible).Dump();
u.Dump();
}
public class Test {
public string Bob;
}