If you are adding a new list of lines to your collection then you would do this:
There is no naming of items within your collection. You would have to use the Find function to find a match to whatever you are searching for or use iteration to go through each element and/or subelement (since your nesting collections).Code:lst.Add(New List(of Lines))
Edit: unless you have a custom class that has a name property, then you can put your text, concatenated and all as its name!
If you are looking to declare a variable on the fly for use in code, I do not think that is not gonna happen. You cannot concatenate strings to create a variable name either. (ie Dim str & i as String where i is part of a For loop) You can however create controls or classes using the CType and/or DirectCast functions on the fly and name them as you please.
Hope that helps a little bit....
D




Reply With Quote