I have several classes implementing the same interface, let's call it "IMyData".
In the following method I want to copy the IMyData data from an object to
a new object of different type but implementing the same common interface
The rest of the question is inline in the following function example:
Public Sub AddObjectToControl(ByVal Data As IMyData)
Dim MLI As New MyListItem()
Now I wan't to assign all the properties in IMyData
to CType(MLI,IMyData). Is there some better (shorter) way to do
this than assigning each property separately like this?
MLI.Property1 = Data.Property1
MLI.Property2 = Data.Property2
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center