I have a dictionary set up like so.
vb.net Code:
Dim dict As New Dictionary(Of String, Object) dict.Add("Filename", s) dict.Add("Type", CType(id(3), FileType))
I then store the dictionary into a dynamically created form's Tag property.
I have tried to extract the "Filename" (which is a string) by using:
vb.net Code:
CType(Me.Tag, Dictionary(Of String, Object))("Filename").ToString
I get the error: Cannot convert Dictionary(Of String, Object) to String.
I am not trying to convert the dictionary, just the "Filename" entry.
Any idea of how to do this? Thanks, Troy.




Reply With Quote