[Mono-bugs] [Bug 430205] New: VB: Invalid conversion from Double to Date

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 26 09:25:20 EDT 2008


User laza at blobworks.com added comment

           Summary: VB: Invalid conversion from Double to Date
           Product: Mono: Runtime
           Version: 1.9
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: laza at blobworks.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User

I did a test with the following vb code fragment:

Public Class Application
        Public Shared Sub Main()
                Dim datum as Date
                Dim oDatum as Object
                oDatum = CDate("10.10.2008").ToOADate
                datum = oDatum
        End Sub
End Class

This gives the (false) result of 01.01.0001 00:00:00 on mono.
On Windows with .net this gives an InvalidCastException during runtime.

Visual Basic.Net Compiler version
Mono JIT compiler version 1.9.1 (tarball)
Linux avion 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686

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.

More information about the mono-bugs mailing list