ya1000 <an*******@discussions.microsoft.com> wrote:
I create an object "A" dynamiclly using Emit, I tryed to cast ti "A"
the obtained object and it throw a cast exception.
I saw that as strings the types are the same but the follow condition
return false:
if (typeof(A) == objectObtainedDynamicly.GetType)
return true;
return false;
As I said this morning, please produce a short but complete example.
The above is somewhat bizarre, as typeof(A) can only work when the type
A exists at compile time - so why are you generating another type with
the same name?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too