Object reference not set to an instance of an object

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Hi all,

//msg has been assigned as type
NHapi.Base.Model.GenericMessage.V23
//NHapi.Model.V23.Message.ORU_R01

ORU_R01 ORUR01 = msg as ORU_R01;

I've got the error coz ORUR01 is always null, because I can't convert msg to
a different type ie to type ORU_R01

How do I do this ?

Thanks

regards,
Andrew
 
Andrew said:
//msg has been assigned as type
NHapi.Base.Model.GenericMessage.V23
//NHapi.Model.V23.Message.ORU_R01

ORU_R01 ORUR01 = msg as ORU_R01;

I've got the error coz ORUR01 is always null, because I can't convert msg to
a different type ie to type ORU_R01

How do I do this ?

Do what, exactly? You've not really given enough context to know what
the situation is or what you're really trying to do.
 
Do the classes "NHapi.Base.Model.GenericMessage.V23" and
"NHapi.Model.V23.Message.ORU_R01" have any relationship to each other? They
aren't in the same namespace.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top