vb.net count duplicate lines then sort from highest count to lowest
Posted on 2012-03-31
Hello, I really need the following help in VB.Net. I am using VS 2008
1.) Read file c:\List.txt, which has a list of numbers per line.
2.) Need to count how many times a duplicate line item appears.
3.) Need to ouput that line item with count total to a file called c:\Amount.txt sorted by highest count to lowest count.
example of c:\list.txt -
example of c:\Amount.txt (sorted by count, highest to lowest) -
78 = 1
80 = 1
59 = 1
92 = 2
64 = 2
Could you please provide me with a complete coded solution for this problem in VB.Net