F
Fredrik Melin
I have the following code that I get "Cannot convert from
DacsaSupport.Inventory to DacsaNET.Inventory"
Public Function RetrieveItem(ByVal Product_ID As String) As Inventory
Dim RemoteInventory As New DacsaSupport.Inventory
If RemoteInventory.Populate(Product_ID) Then
Return CType(RemoteInventory, Inventory)
End If
End Function
The thing is that I know its the same type of object, because they actually
use the same vb file, but of course .NET thinks he cannot convert because
they are from diffrent assemblies.
Is there a way to trick it to convert anyway? Else I can fix it by using
reflection and looping through all variables copying them, but I hoped for
an easier solution.
The reason why I am doing this is DacsaSupport have the functionallity to
connect to a diffrent company, so what the function does is a copy function
between diffrent companies...
DacsaSupport.Inventory to DacsaNET.Inventory"
Public Function RetrieveItem(ByVal Product_ID As String) As Inventory
Dim RemoteInventory As New DacsaSupport.Inventory
If RemoteInventory.Populate(Product_ID) Then
Return CType(RemoteInventory, Inventory)
End If
End Function
The thing is that I know its the same type of object, because they actually
use the same vb file, but of course .NET thinks he cannot convert because
they are from diffrent assemblies.
Is there a way to trick it to convert anyway? Else I can fix it by using
reflection and looping through all variables copying them, but I hoped for
an easier solution.
The reason why I am doing this is DacsaSupport have the functionallity to
connect to a diffrent company, so what the function does is a copy function
between diffrent companies...