Hi all
I have an object created via reflection of type CateringObject. FBO. I'm trying to assign it to a property that accepts objects of type CateringObject. IDeliveryDestin ation (which is implemented by CateringObject. FBO). When I try to set the property to an object of type FBO, I get a bad type error. Using reflection, how do I cast the FBO object to IDeliveryDestin ation? Any advice would be very appreciated
Code snippet included below
Thank
Cha
Type* IDeliveryDestin ationType = myAssembly->GetType(S"Cate ringObjects.IDe liveryDestinati on", true)
Type* fboType = myAssembly->GetType(S"Cate ringObjects.FBO ", true)
MethodInfo* pfnGetFBOByID = fboType->GetMethod(S"Ge tFBOByID")
Object* fboParams[] = {connectionStri ng, __box(destinati onID)}
Object* FBO = pfnGetFBOByID->Invoke(fboType , fboParams)
//error on this line, Object does not match target typ
orderInstance_D eliveryDestinat ion_Property->SetValue(order Instance, FBO, NULL);
Comment