The company I work for recently had a programmer leave and he did a WPF project in VB that is no longer working. I have been assigned to fix the project. The first thing I notice are the build errors on these property variables he has. They look like this
Public Property BasePath As String = "this is a string to db properties"
Public Property header As New CurrentRun_HDR
Public Property PageHolder As New List(Of Page)
Public Property ScheduleHolder As New List(Of Page)
Public Property HeaderHolder As New List(Of Page)
Private Property LastUpdate As DateTime = Now
Private Property RefreshDate As DateTime = Now
Public Property MouseEnabled As Boolean = True
Visual Studio 2008 is saying that properties need a get, set so I satisfied the first one by doing something like this.
Private _Prop2 As String = "this is a string to db properties"
Property BasePath() As String
Get
Return _Prop2
End Get
Set(ByVal value As String)
_Prop2 = value
End Set
End Property
I am not sure how to fix the other errors like the next one
Public Property header As New CurrentRun_HDR
it is saying new is not a valid in this context. When I googled this it says you can do auto implemented properties like this code is doing but they are throwing errors on the build any help would be greatly appreciated. I am using .Net Framework 3.5 with Visual Studio 2008
I have been to this site