Home List of Dictionary to multidimensional array
Reply: 0

List of Dictionary to multidimensional array

user1048
1#
user1048 Published in May 28, 2018, 9:46 am

I am trying to pass a list of files and paths to a third party method that accepts only a String(,). this selection can vary depending on the users selections.

I thought the following would represent then 2D array, holding the path and the name of the files.

myFiles As New List(Of Dictionary(Of String, String))()

But when I have to pass this to the method for example

ProcessFiles(ByVal Attachments(,) As String)

With

 ProcessFiles(myFiles.ToArray())

I get the error

"Value of 'Dictionary(Of String, string)() cannot be converted to a String(,) because the array types have different numbers of dimensions.

How do I define my List to be representative of the array?

The array is expecting a layout of

(0,0) --> "\\location\Of\File"
(0,1) --> "filename"
(1,0) --> "\\location\Of\File2"
(1,1) --> "filename2"
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.321665 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO