Could anyone let me know why in VB.Net I’m getting this error on the third line of code below?
ERROR:
Option Strict On disallows implicit conversions from 'System.Object' to 'VBNET.HowTo.Address'.
CODE:
ReadOnly Property CurrentAddress() As Address
Get
Return AddressBook.Items(CurrentAddressIndex - 1)
End Get
End Property
I declare like this:
Public AddressBook As AddressBook
Private _currentAddressIndex As Integer
Thanks
ERROR:
Option Strict On disallows implicit conversions from 'System.Object' to 'VBNET.HowTo.Address'.
CODE:
ReadOnly Property CurrentAddress() As Address
Get
Return AddressBook.Items(CurrentAddressIndex - 1)
End Get
End Property
I declare like this:
Public AddressBook As AddressBook
Private _currentAddressIndex As Integer
Thanks