Convert Object element from dictionary(String, object) to datatable

Hello
I want to use a dictionary of type String, Object.
I want to store values of different types, one of them a Datatable.

How could I retrieve the value from the dictionry and cast it as datatable when doing the assignment to a local datatable variable?
without any manipulation there is an error message on strict on disallows implicit conversions.
Thanks

2 Likes

the below post might be helpful

1 Like

Hi,

Can you try CType or DirectCast ,as the following?

Regards,

3 Likes

Yes exactly what I needed. Appreciate the graphical example.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.