https://bugzilla.novell.com/show_bug.cgi?id=385486
Summary: unbox.any and explicit cast operator Product: Mono: Runtime Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: generics AssignedTo: mono-bugs@lists.ximian.com ReportedBy: [EMAIL PROTECTED] QAContact: mono-bugs@lists.ximian.com Found By: --- Compile (gmcs) and run the following test case: ------------- using System; class Test { static void Main () { Decimal dec = new Decimal(1000); Console.WriteLine ((int) dec); Console.WriteLine (Cast<int>(dec)); } static T Cast<T> (object value) { return (T)value; } } ------------ The output is: 1000 Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type. at Test.Main () [0x00000] ------------- Looks like 'unbox.any' does not know about explicit cast operators. Should 'unbox.any' use the op_Explicit(blah)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs