if that xml file have many Invoice my for each can work very good.But if that xml file have just one Invoice for each gives error because if xml have many Invoice ObjectXDTO.Invoice return XDTOList type but If xml have a Ivoice ObjectXDTO return XDTOObject. I try to fix with TypeOf but I couldn't. How can I fix this situation.
Could you help me please?
edit: TypeOf Function doesn't useful. İf I check Shift+F9 return Type is XDTOList or XDTOObject but If I check TypeOf method return type always XDTOObject.