Type Conversion Problem

  • Thread starter Thread starter Owen Hines
  • Start date Start date
O

Owen Hines

If anyone can advise me of a way forward regarding the following it would be
appreciated.
I have a structure which is returned from a method that is called via
reflections invokemember.
when the structure gets back to me in an Object, via the debugger I can see
that the underlying type
is the structure, and all the values and variables are there, but I can't
cast it from the Object (system.object) to the structure that it is

does anyone have a definative answer. ?

thanks in advance ...

Owen
 
Owen Hines said:
If anyone can advise me of a way forward regarding the following it would be
appreciated.
I have a structure which is returned from a method that is called via
reflections invokemember.
when the structure gets back to me in an Object, via the debugger I can see
that the underlying type
is the structure, and all the values and variables are there, but I can't
cast it from the Object (system.object) to the structure that it is

does anyone have a definative answer. ?

Is the type in the same assembly, or has it been loaded by reflection?
If it's the latter, this might be the problem:

http://www.pobox.com/~skeet/csharp/plugin.html
 
Jon,
read the article, has done the trick. Thankyou very much indeed.
MMMmmmm.... I think I'll have to use these news groups more often !!!!!!

thanks.

Owen
 
Back
Top