Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Casting
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00883795
Message ID:
00888521
Views:
10
Thank's a lot for your time.
It's the same for me, i don't find anything in this way at this time

I'm sorry that it takes so much time to answer
Thank's again


>Hey Rock,
>
>I don't think you can do that. AFAIK, you can only cast to an interface and that interface must be available to both the caller and callee's AppDomain...
>
>In the past my workaround for those kind of things has been to either implement a specific interface to cast to for any dynamically created types (I was using CodeDom for this) or alternately providing a generic interface to dynamically call methods/properties on the new types through Reflection. The latter has more overhead but the advantage is that it's truly generic and you don't need anything else on the type implementation.
>
>The latter part is written up in my Dynamic Code execution article (about COdeDom) at:
>
>http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm
>
>Hope this helps,
>
>+++ Rick ---
>
>>Hi Every body,
>>
>>Do you know how to make a cast with a dynamic Type
>>
>>You know something like that....
>>Ex:
>> x = (this.GetNewType())this.GetMyNewTypeObject()
>>or
>> x = this.GetMyNewTypeObject() as this.GetNewType()
>>
>>Thank's in advance
>>Rock Legendre
>>Wx3data
Previous
Reply
Map
View

Click here to load this message in the networking platform