> Why can't I safe_cast a Dictionary to an Object?
>
[quoted text clipped - 5 lines]
>
> Dave
You have a mistake in your 'Dict' declaration. You have to declare it like a
managed reference:
Generic::Dictionary<String^, String^>^ Dict = gcnew Generic::Dictionary<String^,
String^>();
Regards
--
Cholo Lennon
Bs.As.
ARG
Dave - 16 Oct 2007 16:35 GMT
Thanks, that fixed it
>> Why can't I safe_cast a Dictionary to an Object?
>>
[quoted text clipped - 20 lines]
> Bs.As.
> ARG
Ben Voigt [C++ MVP] - 16 Oct 2007 17:32 GMT
>> Why can't I safe_cast a Dictionary to an Object?
>>
[quoted text clipped - 13 lines]
> Generic::Dictionary<String^,
> String^>();
This should also work:
Generic::Dictionary<String^, String^> Dict;
Object^ DictObject = %Dict; // managed address-of -- but managed
deference is still *, not ^ if I remember right
> Regards
>
> --
> Cholo Lennon
> Bs.As.
> ARG