Converting/Assigning DataTable Object to Dictionary

Hello -

I am storing 2 values in a DataTable. Even though I specify the data type in the datatable, the values are stored as ‘Objects’.


Does anyone know how to convert an Object to a Dictionary<String,String> and Dictionary<String,String>?
When I try to assign the values to their respective variables/arguments (of types Dictionary<String,String> and Dictionary<String,String>) I get an error indicating an object cannot be converted to a Dictionary<String,String> or Dictionary<String,String>.

Thanks in advance.

Regards,
symilawr

Hi,

The following expression helps you.

dict = CType(o,Dictionary(Of String,String()))

Regards,

1 Like

A legend!! Many thanks!

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