Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Casting from an interface to mmBusinessObjectGeneric
Message
De
02/05/2011 10:06:01
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Casting from an interface to mmBusinessObjectGeneric
Divers
Thread ID:
01509014
Message ID:
01509014
Vues:
98
I’m working on some base classes in there own project that need to access the entity object in mmBusinessObjectGeneric
In these base classes the business object “DataCapReturn” implements an interface IdataCapReturn. The interface has the methods and properties needed.
I have another interface IdataCapReturnEntity that has the common data properties that I need to access. This interface is implemented by the DataCapReturnEntity.

Where I’m running into trouble is casting from the interface to mmBusinessObjectGeneric
Example code.
Dim mmReturnData As mmBusinessObjectGeneric(Of mmBusinessEntity) = CType(Me.oReturnData, mmBusinessObjectGeneric(Of mmBusinessEntity))
Dim oEntity As IdataCaptureReturnEntity = CType(mmReturnData.Entity, IdataCaptureReturnEntity)

This throws a casting execption
How can I cast from the interface to mmBusinessObjectGeneric?
Répondre
Fil
Voir

Click here to load this message in the networking platform