[Mono-dev] ChangeType for Nullable

Jerry Haltom wasabi at larvalstage.net
Wed May 24 11:59:28 EDT 2006


I wasn't aware that code would work on any .Net

"typeof" only runs on Type names.  typeof(int?) works. typeof(number)
should not.

On Wed, 2006-05-24 at 08:48 -0700, tut wrote:
> Hi!
> What do you think about working of Convert.ChangeType with nullable types?
> 
> I found that next code does not work with Nullable Types in .NET 2.0:
> 
> int? number;
> number = Convert.ChangeType("0", typeof(number))
> 
> Seems it is Microsoft's bug. What mono developers think about this? How does
> mono should run this code?
> --
> View this message in context: http://www.nabble.com/ChangeType+for+Nullable-t1675856.html#a4543806
> Sent from the Mono - Dev forum at Nabble.com.
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list