dcsimg
Results 1 to 2 of 2

Thread: [RESOLVED] VB.net List of String Group by Sequence Order

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2011
    Posts
    60

    Resolved [RESOLVED] VB.net List of String Group by Sequence Order

    HTML Code:
     Dim _lstOfFontsList As New List(Of String)
     From 
    {"Arial", "Arial", "Arial", "GEORGIA", "Arial", 
    "Arial", "GEORGIA", "GEORGIA",
     "ABOlD", "ABOlD", "Arial"}
    how to get group by name with sequence and count value like

    Code:
    Arial = 3
    Georgia =1
    Arial=2
    Georgia=2
    Abold=2
    Arial=1
    i tried this code

    Code:
      
    Dim Cntdd = _lstOfFontsList.GroupBy(Function(S) S).ToDictionary
                         (Function(a) a.Key, Function(a) a.Count)
    output is

    [Arial, 6]
    [GEORGIA, 3]
    [ABOlD, 2]

    but how to combine or joining nearest similiar items in list of string...
    needed out like this

    Code:
    Arial = 3
    Georgia =1
    Arial=2
    Georgia=2
    Abold=2
    Arial=1
    Please help

  2. #2

    Thread Starter
    Member
    Join Date
    Oct 2011
    Posts
    60

    Re: VB.net List of String Group by Sequence Order

    Problem is solved ..... linq is here

    https://stackoverflow.com/questions/...06911#49106911

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width