System.Nullable.FromObject - Not valid with VS 2005

Posted on 2006-05-03
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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now