Learn how to a build a cloud-first strategyRegister Now


System.Nullable.FromObject - Not valid with VS 2005

Posted on 2006-05-03
Medium Priority
Last Modified: 2008-02-01
I was previously using VS 2005 Beta 2 and just upgraded to the released version of VS 2005 Pro.  Everything seems to work fine except for 2 forms (out of 30).   After opening my project in VS I attempted a build and it came back with an error.  There were no errors the last time I worked with the Beta version.   The error is in the Designer file for the form.   Here's the code in question:

Public Overloads Overridable Function Fill(ByVal dataTable As SelectMemberHarvestPlanVolume.usp_SelectMemberHarvestPlanVolumeDataTable, ByVal harvestPlanID As System.Nullable(Of System.Guid)) As System.Nullable(Of Integer)
            Me.Adapter.SelectCommand = Me.CommandCollection(0)
            If (harvestPlanID.HasValue = true) Then
                Me.Adapter.SelectCommand.Parameters(1).Value = CType(harvestPlanID.Value,System.Guid)
                Me.Adapter.SelectCommand.Parameters(1).Value = System.DBNull.Value
            End If
            If (Me.m_clearBeforeFill = true) Then
            End If
            If ((Me.Adapter.SelectCommand.Parameters(0).Value Is Nothing)  _
                        OrElse (Me.Adapter.SelectCommand.Parameters(0).Value.GetType Is GetType(System.DBNull))) Then
                Return System.Nullable.FromObject(Of Integer)(Nothing)
                Return New System.Nullable(Of Integer)(CType(Me.Adapter.SelectCommand.Parameters(0).Value,Integer))
            End If
        End Function

The problem is with "System.Nullable.FromObject".  VS says that "FromObject is not a member of System.Nullable".  

What needs to be changed to get this to work?

Thank you in advance.
Question by:purfus
1 Comment
LVL 15

Accepted Solution

dave4dl earned 1500 total points
ID: 16599349

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question