Click here to Skip to main content
15,890,366 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.

 
GeneralRe: Using IEnumerable nonsense for everything Pin
Mike Marynowski19-Jul-16 7:24
professionalMike Marynowski19-Jul-16 7:24 
GeneralRe: Using IEnumerable nonsense for everything Pin
F-ES Sitecore18-Jul-16 22:33
professionalF-ES Sitecore18-Jul-16 22:33 
GeneralRe: Using IEnumerable nonsense for everything Pin
Mike Marynowski18-Jul-16 22:41
professionalMike Marynowski18-Jul-16 22:41 
GeneralRe: Using IEnumerable nonsense for everything Pin
Richard Deeming19-Jul-16 2:41
mveRichard Deeming19-Jul-16 2:41 
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 
Yes - but you need to debug the criteria it's using rather than the complete code - which isn't complicated. Would you like to write and debug "Except" each time you need it? Laugh | :laugh:
No - so you'd write it once and call it from multiple places. Which is exactly what I do when I use aCollection.Except(anotherCollection) - except I don't have to write it in the first place!

And you have to admit that
C#
var inDuration = DiskFile.GetAll().Where(df => !df.HasDuration).Select(df => df.Video).Distinct();
Is a lot more readable than the "home brew" version using methods:
C#
var inDuration = Distinct(Select(Where(DiskFile.GetAll(), Video), HasDuration));

Where it's a PITA to just make sure the brackets match up! Laugh | :laugh:

Yes, Linq methods can be slower to execute - but sometimes the absolute speed isn't that important, but reliability and ease of maintenance is.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

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 
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 

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.