I have an array of items where i have separated the first two characters, which in my case are ID tags. I have populated my CLBox and the output is like this
I would like to count the matching tags and show the totals like this
At the moment my code looks like this
What would the process be to do this, would i need to create a reference list or stringbuilder for all the tags(there is about 3000 tags) or would it be possible to loop through and count the matches. I declared the Tags thinking that i could do something from there.
Any help would be appreciated
VB.NET:
AA
Aa
BB
bb
C1
20
3c
AA
BB
C1
C1
etc, etc
I would like to count the matching tags and show the totals like this
VB.NET:
AA=2
Aa=1
BB=2
bb=1
C1=3
etc, etc
At the moment my code looks like this
VB.NET:
Private Sub Button1_Click()
For i As Integer = 0 To ListBox1.SelectedItems.Count - 1
Using r = New StreamReader(ListBox1.SelectedItems(i).ToString)
Dim TshirtList As String = r.ReadLine
While Not TshirtList Is Nothing
Dim IDTag() As String = TshirtList.Split("-")
Dim Tags As String = IDTag(1).Substring(0, 2)
CheckedListBox1.Items.Add(Tags)
TshirtList = r.ReadLine
What would the process be to do this, would i need to create a reference list or stringbuilder for all the tags(there is about 3000 tags) or would it be possible to loop through and count the matches. I declared the Tags thinking that i could do something from there.
Any help would be appreciated