Click here to Skip to main content
15,893,381 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Using IEnumerable nonsense for everything Pin
Clifford Nelson18-Jul-16 6:43
Clifford Nelson18-Jul-16 6:43 
GeneralRe: Using IEnumerable nonsense for everything Pin
OriginalGriff16-Jul-16 6:03
mveOriginalGriff16-Jul-16 6:03 
GeneralRe: Using IEnumerable nonsense for everything Pin
harold aptroot16-Jul-16 6:10
harold aptroot16-Jul-16 6:10 
GeneralRe: Using IEnumerable nonsense for everything Pin
OriginalGriff16-Jul-16 6:33
mveOriginalGriff16-Jul-16 6:33 
GeneralRe: Using IEnumerable nonsense for everything Pin
harold aptroot16-Jul-16 6:39
harold aptroot16-Jul-16 6:39 
GeneralRe: Using IEnumerable nonsense for everything Pin
Sentenryu18-Jul-16 0:03
Sentenryu18-Jul-16 0:03 
GeneralRe: Using IEnumerable nonsense for everything Pin
harold aptroot18-Jul-16 0:54
harold aptroot18-Jul-16 0:54 
GeneralRe: Using IEnumerable nonsense for everything Pin
Sentenryu18-Jul-16 2:00
Sentenryu18-Jul-16 2:00 
this thread only shows that you're hellbent on your "One true way" of coding, so there's not much to discuss here.

but do keep in mind that calling a style "cancer" just because you don't want to learn how to read and use it is exactly what causes so many flamewars on the IT world (tabs vs spaces anyone?). Sure, you tell me it's just an if but you know what? I much prefer to read
C#
someList.Where(condition).Select(fields).Distinct().OrderBy(field)

than the alternative
C#
HashSet<Type> distinctSet = new HashSet<Type>();

foreach(var item in someList){
    if(condition){
        distinctSet.Add(item);
    }
}
<sort the set in whatever way you do it manually>

specially if you want to roll your own sorting method at the end.

As a last note, i sometimes work with code where the order of operations (where, distinct, etc) sometimes yields different results and is important (due to crazy business rules, what can you do), so it's way easier to get the intent from the link way, but I recognize that you mileage may vary on that last one.
GeneralRe: Using IEnumerable nonsense for everything Pin
harold aptroot18-Jul-16 2:08
harold aptroot18-Jul-16 2:08 
GeneralRe: Using IEnumerable nonsense for everything Pin
Sentenryu18-Jul-16 2:42
Sentenryu18-Jul-16 2:42 
GeneralRe: Using IEnumerable nonsense for everything Pin
jfren48418-Jul-16 3:31
jfren48418-Jul-16 3:31 
GeneralRe: Using IEnumerable nonsense for everything Pin
Clifford Nelson18-Jul-16 10:15
Clifford Nelson18-Jul-16 10:15 
GeneralRe: Using IEnumerable nonsense for everything Pin
Mladen Janković18-Jul-16 10:36
Mladen Janković18-Jul-16 10:36 
GeneralRe: Using IEnumerable nonsense for everything Pin
Maarten197718-Jul-16 3:48
Maarten197718-Jul-16 3:48 
GeneralRe: Using IEnumerable nonsense for everything Pin
Herbie Mountjoy18-Jul-16 1:49
professionalHerbie Mountjoy18-Jul-16 1:49 
GeneralRe: Using IEnumerable nonsense for everything Pin
Rob Grainger19-Jul-16 5:56
Rob Grainger19-Jul-16 5:56 
GeneralRe: Using IEnumerable nonsense for everything Pin
#realJSOP16-Jul-16 6:07
mve#realJSOP16-Jul-16 6:07 
GeneralRe: Using IEnumerable nonsense for everything Pin
BillWoodruff16-Jul-16 6:12
professionalBillWoodruff16-Jul-16 6:12 
GeneralRe: Using IEnumerable nonsense for everything Pin
harold aptroot16-Jul-16 6:16
harold aptroot16-Jul-16 6:16 
GeneralRe: Using IEnumerable nonsense for everything Pin
BillWoodruff16-Jul-16 6:20
professionalBillWoodruff16-Jul-16 6:20 
GeneralRe: Using IEnumerable nonsense for everything Pin
Marc Clifton16-Jul-16 14:47
mvaMarc Clifton16-Jul-16 14:47 
GeneralRe: Using IEnumerable nonsense for everything Pin
BillWoodruff16-Jul-16 18:45
professionalBillWoodruff16-Jul-16 18:45 
GeneralRe: Using IEnumerable nonsense for everything Pin
Marc Clifton17-Jul-16 3:55
mvaMarc Clifton17-Jul-16 3:55 
GeneralRe: Using IEnumerable nonsense for everything Pin
Jono Stewart18-Jul-16 4:10
Jono Stewart18-Jul-16 4:10 
GeneralRe: Using IEnumerable nonsense for everything Pin
Rob Grainger19-Jul-16 22:21
Rob Grainger19-Jul-16 22:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.