Embarrased:
If I create a class...
public class toads
private gen_toads as integer
private toads_color as string...
Public Property mgen_toads() As Integer
Get
return mgen_toads
End Get
Set(ByVal Value As Integer)
mgen_toads = Value
End Set
End Property
Public Property mtoads_color() As string...
end class
And I fill with dnn fill object...
Public Shared Function FillObject(ByVal dr As IDataReader, ByVal objType As Type, ByVal ManageDataReader As Boolean) As Object
Dim objFillObject As Object
' get properties for type
Dim objProperties As ArrayList = GetPropertyInfo(objType)
' get ordinal positions in datareader
Dim arrOrdinals As Integer() = GetOrdinals(objProperties, dr)
Dim [Continue] As Boolean
If ManageDataReader Then
[Continue] = False
' read datareader
If dr.Read() Then
[Continue] = True
End If
Else
[Continue] = True
End If
If [Continue] Then
' create custom business object
objFillObject = CreateObject(objType, dr, objProperties, arrOrdinals)
Else
objFillObject = Nothing
End If
If ManageDataReader Then
' close datareader
If Not dr Is Nothing Then
dr.Close()
End If
End If
Return objFillObject
End Function
How do I refer to one member of the returned 3 toads?
Dim ctrlToads As New toadController
Dim infoToads As New toads
infoToads = ctrlToads.getAllToads()
'how do I best refer to member toad that has gen_toads = 3?
Thankyou