Hello guys, I am creating a multidimensional list(of string) of some sort like this
It creates something Like this........... For example
Type_List(0) = saves strings for Letter and Type_List(1) is for Document and so on................. and in this Type_List(0), Type_List(0)(0) is for names, Type_List(0)(1) is for Items and so on, I think it restores correctly but, when I try to search in Type_List(0)(0), it is getting all the items in Type_List if self
Searching Code :
List_Index is an passed argument that gets the index of the first list, for example if for Letter then it should be 0
after I view the items in Data_View_Change_Column_Names, it has all the items in Type_List of each index............... how can i narrow it down???
Code:
Dim Type_List As New List(Of List(Of List(Of String)))
Dim Empty_List As New List(Of List(Of String))
Dim Empty_List2 As New List(Of String)
'Letter
Type_List.Add(Empty_List)
Type_List.Item(0).Add(Empty_List2)
Type_List.Item(0).Add(Empty_List2)
Type_List.Item(0).Add(Empty_List2)
Type_List.Item(0).Add(Empty_List2)
Type_List.Item(0).Item(0).Add("Name1")
Type_List.Item(0).Item(0).Add("Name2")
Type_List.Item(0).Item(1).Add("Item1_Name")
Type_List.Item(0).Item(2).Add("Item1_Value")
Type_List.Item(0).Item(3).Add("Item1")
Type_List.Item(0).Item(3).Add("Item2")
Type_List.Item(0).Item(3).Add("Item3")
'Recieve_Doc
Type_List.Add(Empty_List)
Type_List.Item(1).Add(Empty_List2)
Type_List.Item(1).Add(Empty_List2)
Type_List.Item(1).Add(Empty_List2)
Type_List.Item(1).Add(Empty_List2)
Type_List.Item(1).Item(0).Add("Name1")
Type_List.Item(1).Item(0).Add("Name2")
Type_List.Item(1).Item(1).Add("Item1_Name")
Type_List.Item(1).Item(2).Add("Item1_Value")
Type_List.Item(1).Item(3).Add("Item1")
Type_List.Item(1).Item(3).Add("Item2")
Type_List.Item(1).Item(3).Add("Item3")
'Send_Doc
Type_List.Add(Empty_List)
Type_List.Item(2).Add(Empty_List2)
Type_List.Item(2).Add(Empty_List2)
Type_List.Item(2).Add(Empty_List2)
Type_List.Item(2).Add(Empty_List2)
Type_List.Item(2).Item(0).Add("Name1")
Type_List.Item(2).Item(0).Add("Name2")
Type_List.Item(2).Item(1).Add("Item1_Name")
Type_List.Item(2).Item(2).Add("Item1_Value")
Type_List.Item(2).Item(3).Add("Item1")
Type_List.Item(2).Item(3).Add("Item2")
Type_List.Item(2).Item(3).Add("Item3")
Type_List(0) = saves strings for Letter and Type_List(1) is for Document and so on................. and in this Type_List(0), Type_List(0)(0) is for names, Type_List(0)(1) is for Items and so on, I think it restores correctly but, when I try to search in Type_List(0)(0), it is getting all the items in Type_List if self
Searching Code :
List_Index is an passed argument that gets the index of the first list, for example if for Letter then it should be 0
Code:
For Each item As String In Type_List.Item(List_Index).Item(0).ToList
Data_View_Change_Column_Names.Add(item)
Next