G
Guest
I use one of 2 arrays dependent on the country.
Rather than say:
if exchangeID = 1 then
dim myPlaceBets() as As UK.exchange.PlaceBets
many statements
myPlaceBetsReq.bets = myPlaceBets
else
dim myPlaceBets() As AU.exchange.PlaceBets
many statements
myPlaceBetsReq.bets = myPlaceBets
end if
I want to say is something like this:
Public Property myPlaceBets() As
BF4_1_rel_13_4.betfair.UK.exchange.PlaceBets OR as
BF4_1_rel_13_4.betfair.AU.exchange.PlaceBets
Not being able to do this I said
Public Property myPlaceBets() As Object
Defining the property as Object, while the correct array is returned, it
fails in use with the message:
Conversion from type 'Object()' to type 'PlaceBets()' is not valid. Here's
the Property.
Private _myPlaceBetsUK(-1) As UK.exchange.PlaceBets
Private _myPlaceBetsAU(-1) As AU.exchange.PlaceBets
Private _PlaceBets() = {_myPlaceBetsUK, _myPlaceBetsAU}
Public Property myPlaceBets() As Object
Get
Return _PlaceBets(exchangeId - 1)
End Get
Set(ByVal Value As Object)
_PlaceBets(exchangeId - 1) = Value
End Set
End Property
Any help would be appreciated.
Gadya
Rather than say:
if exchangeID = 1 then
dim myPlaceBets() as As UK.exchange.PlaceBets
many statements
myPlaceBetsReq.bets = myPlaceBets
else
dim myPlaceBets() As AU.exchange.PlaceBets
many statements
myPlaceBetsReq.bets = myPlaceBets
end if
I want to say is something like this:
Public Property myPlaceBets() As
BF4_1_rel_13_4.betfair.UK.exchange.PlaceBets OR as
BF4_1_rel_13_4.betfair.AU.exchange.PlaceBets
Not being able to do this I said
Public Property myPlaceBets() As Object
Defining the property as Object, while the correct array is returned, it
fails in use with the message:
Conversion from type 'Object()' to type 'PlaceBets()' is not valid. Here's
the Property.
Private _myPlaceBetsUK(-1) As UK.exchange.PlaceBets
Private _myPlaceBetsAU(-1) As AU.exchange.PlaceBets
Private _PlaceBets() = {_myPlaceBetsUK, _myPlaceBetsAU}
Public Property myPlaceBets() As Object
Get
Return _PlaceBets(exchangeId - 1)
End Get
Set(ByVal Value As Object)
_PlaceBets(exchangeId - 1) = Value
End Set
End Property
Any help would be appreciated.
Gadya