Click here to Skip to main content
15,892,697 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: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 11:41
professionalEddy Vluggen25-Oct-16 11:41 
GeneralMessage Removed Pin
25-Oct-16 11:57
professionalN_tro_P25-Oct-16 11:57 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen26-Oct-16 2:57
professionalEddy Vluggen26-Oct-16 2:57 
GeneralMessage Removed Pin
26-Oct-16 3:24
professionalN_tro_P26-Oct-16 3:24 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen26-Oct-16 3:56
professionalEddy Vluggen26-Oct-16 3:56 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel25-Oct-16 10:39
professionalSander Rossel25-Oct-16 10:39 
GeneralMessage Removed Pin
25-Oct-16 11:03
professionalN_tro_P25-Oct-16 11:03 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel25-Oct-16 11:43
professionalSander Rossel25-Oct-16 11:43 
N_tro_P wrote:
This is again an example of someone not knowing what they are doing
Or someone who knew fully well what they did, but just missed it. I believe the query changed, so that person basically changed everything after Context.Things and just forgot the call to ToList. The person may have been me, I couldn't say. I was the one to fix it though.
N_tro_P wrote:
good perf testing prior to release
Yeah, neither us nor our customer can afford a second environment that's exactly like our production environment D'Oh! | :doh:
It worked fine in tests.
N_tro_P wrote:
Stop blaiming var for your problems
I actually blame IQueryable that looks like an IEnumerable, but is really something very different. IQueryable quaks like a duck and walks like a duck, but isn't actually a duck. IQueryable breaks the Liskov's Substitution Principle (the L in SOLID) that states that any super class must behave like its base class.
Only by not using var we can catch such by-design-quirks.

The only REAL reason to use var, where you actually HAVE to, is when you use anonymous types.
Read my (free) ebook Object-Oriented Programming in C# Succinctly.
Visit my blog at Sander's bits - Writing the code you need.
Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability.
— Edsger W. Dijkstra
Regards,
Sander

GeneralMessage Removed Pin
25-Oct-16 12:08
professionalN_tro_P25-Oct-16 12:08 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel25-Oct-16 12:26
professionalSander Rossel25-Oct-16 12:26 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Jeremy Falcon26-Oct-16 8:43
professionalJeremy Falcon26-Oct-16 8:43 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel26-Oct-16 8:46
professionalSander Rossel26-Oct-16 8:46 
GeneralRe: An interesting (or not) thing about C#'s var Pin
CDP180225-Oct-16 10:50
CDP180225-Oct-16 10:50 
GeneralMessage Removed Pin
25-Oct-16 11:05
professionalN_tro_P25-Oct-16 11:05 
GeneralRe: An interesting (or not) thing about C#'s var Pin
TheGreatAndPowerfulOz25-Oct-16 12:20
TheGreatAndPowerfulOz25-Oct-16 12:20 
GeneralRe: An interesting (or not) thing about C#'s var Pin
n.podbielski25-Oct-16 8:09
n.podbielski25-Oct-16 8:09 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Marc Clifton25-Oct-16 8:21
mvaMarc Clifton25-Oct-16 8:21 
GeneralRe: An interesting (or not) thing about C#'s var Pin
n.podbielski25-Oct-16 8:35
n.podbielski25-Oct-16 8:35 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Nish Nishant25-Oct-16 10:14
sitebuilderNish Nishant25-Oct-16 10:14 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Mladen Janković25-Oct-16 10:20
Mladen Janković25-Oct-16 10:20 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Mycroft Holmes25-Oct-16 14:17
professionalMycroft Holmes25-Oct-16 14:17 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Richard Deeming26-Oct-16 3:50
mveRichard Deeming26-Oct-16 3:50 
GeneralRe: An interesting (or not) thing about C#'s var Pin
#realJSOP26-Oct-16 0:06
mve#realJSOP26-Oct-16 0:06 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Richard Deeming26-Oct-16 3:52
mveRichard Deeming26-Oct-16 3:52 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Jeremy Falcon26-Oct-16 8:44
professionalJeremy Falcon26-Oct-16 8:44 

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.