I’m making a project for my work, and there is a big problem…
I’m making a software that takes information about users from a CSV(coma separate values) file. Every user has own phone number and a number that he was called. When the inforamtion is gathered from the file, i want to take the all phone numbers that are for a number and sort them ascending. I want not to be all ocurance of phone number, just this that are with big duration to be up. That means like that:
1-345345-9375683027
2-345345-3070982743
3-345345-9375683027
4-345345-3070982743
5-345345-9375683027
6-345345-2389479734
7-345345-2349875993
Number 1, 3 and 5 are equals.
Number 2 and 4 are equals.
I want to sort the number like this:
1-345345-9375683027
2-345345-3070982743
3-345345-2389479734
4-345345-2349875993
Now 1 us the most common, 2 is less comon that first and so one…
I was trying any thing but without problem.
Like this one:
var result = user.transactions.where(x=>x.phone == user.phone);
If you want to look at the project that i’m making here is the solution file:
http://mtelanalyzer.codeplex.com/
Assuming the phone numbers are a
List<String>:, then by the numberIEnumerable<String>(or whatever type it is)Edit: I’ve only just seen that you’re ordering as second not by number but by the index. That makes it a little bit more complicated: