System.Nullable.FromObject - Not valid with VS 2005
Posted on 2006-05-03
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
If (Me.m_clearBeforeFill = true) Then
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))
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.