2009-03-14 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Sat, 14 Mar 2009 18:56:43 +0000 (18:56 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 14 Mar 2009 18:56:43 +0000 (18:56 -0000)
commite514e8522dfefc68b5f7fbc232acd0c0495a90da
treed52a04869f18c2e3ca446b60a7352350fb167402
parent26d510deebab23a01c9de37e8437782b07439a0b
2009-03-14  Miguel de Icaza  <miguel@novell.com>

* Convert.cs (ToType): Control whether this internal function will
call an IConvertible.ToType method or not.

Classes and structs implementing IConvertible in mscorlib (the
only callers that can access Convert.ToType) must pass false to
avoid a infinite recursion problem and callers from the public
Convert API must call it with true.

This fixes the regression reported in #485377 that was introduced
by the fix for #481687.

* Int16.cs, UInt64.cs, Double.cs, Enum.cs, SByte.cs, UInt16.cs,
Byte.cs, Decimal.cs, Int32.cs, String.cs, Int64.cs, Char.cs,
Boolean.cs, Single.cs, UInt32.cs: Update the call sites.

svn path=/trunk/mcs/; revision=129367
18 files changed:
mcs/class/corlib/System/Boolean.cs
mcs/class/corlib/System/Byte.cs
mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Char.cs
mcs/class/corlib/System/Convert.cs
mcs/class/corlib/System/Decimal.cs
mcs/class/corlib/System/Double.cs
mcs/class/corlib/System/Enum.cs
mcs/class/corlib/System/Int16.cs
mcs/class/corlib/System/Int32.cs
mcs/class/corlib/System/Int64.cs
mcs/class/corlib/System/SByte.cs
mcs/class/corlib/System/Single.cs
mcs/class/corlib/System/String.cs
mcs/class/corlib/System/UInt16.cs
mcs/class/corlib/System/UInt32.cs
mcs/class/corlib/System/UInt64.cs
mcs/class/corlib/Test/System/ConvertTest.cs