Hi All
I am trying to create a custom class to hold data from a database with the following code
[SIZE=1]Public Class NewsObject
Public Property articleID() As Integer
Public Property articleTitle() As String
Public Property articleBody() As String
Public Sub New()
End Sub
Public Sub New(ByVal articleid As Integer, ByVal atricletitle As String)
Me.articleID = articleid
Me.articleTitle = atricletitle
End Sub
Public Sub New(ByVal atricletitle As String, ByVal articlebody As String)
Me.articleTitle = atricletitle
Me.articleBody = articlebody
End Sub
Public Sub New(ByVal articleid As Integer, ByVal atricletitle As String, ByVal articlebody As String)
Me.articleID = articleid
Me.articleTitle = atricletitle
Me.articleBody = articlebody
End Sub
End Class[/SIZE]
When I try to create an instance of this object I cannot use the 2nd or 3rd constructor
throws an overload resolution exception. I know both constructors have the same number of parameters
but they are of different data types so I thought this was allowed
Can anyone shed any light on this
Many Thanks