Click here to Skip to main content
14,662,449 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: Worst use of var I've seen... Pin
Sander Rossel9-Apr-18 23:52
professionalSander Rossel9-Apr-18 23:52 
GeneralRe: Worst use of var I've seen... Pin
Munchies_Matt9-Apr-18 20:40
MemberMunchies_Matt9-Apr-18 20:40 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel9-Apr-18 21:50
professionalSander Rossel9-Apr-18 21:50 
GeneralRe: Worst use of var I've seen... Pin
#realJSOP9-Apr-18 23:21
mva#realJSOP9-Apr-18 23:21 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel9-Apr-18 23:29
professionalSander Rossel9-Apr-18 23:29 
GeneralRe: Worst use of var I've seen... Pin
Eytukan9-Apr-18 20:43
MemberEytukan9-Apr-18 20:43 
GeneralRe: Worst use of var I've seen... Pin
OriginalGriff9-Apr-18 21:32
mveOriginalGriff9-Apr-18 21:32 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel9-Apr-18 21:49
professionalSander Rossel9-Apr-18 21:49 
dynamic is part of the Dynamic Language Runtime, which allows interoperability with loosely typed languages such as Ruby (or so I'm told).
It also comes in handy when using late binding with COM objects.
And I've used it once or twice with some Type<T> where T isn't really important, but can't be deduced, for example List<T>.Count.

var is really only necessary for anonymous types.

GeneralRe: Worst use of var I've seen... Pin
HobbyProggy9-Apr-18 21:56
professionalHobbyProggy9-Apr-18 21:56 
GeneralRe: Worst use of var I've seen... Pin
OriginalGriff9-Apr-18 22:02
mveOriginalGriff9-Apr-18 22:02 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel9-Apr-18 23:49
professionalSander Rossel9-Apr-18 23:49 
GeneralRe: Worst use of var I've seen... Pin
HobbyProggy9-Apr-18 23:56
professionalHobbyProggy9-Apr-18 23:56 
GeneralRe: Worst use of var I've seen... Pin
Nathan Minier10-Apr-18 1:35
professionalNathan Minier10-Apr-18 1:35 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel10-Apr-18 1:43
professionalSander Rossel10-Apr-18 1:43 
GeneralRe: Worst use of var I've seen... Pin
Nathan Minier10-Apr-18 1:56
professionalNathan Minier10-Apr-18 1:56 
GeneralRe: Worst use of var I've seen... Pin
HobbyProggy10-Apr-18 2:34
professionalHobbyProggy10-Apr-18 2:34 
GeneralRe: Worst use of var I've seen... Pin
CodeWraith11-Apr-18 5:01
MemberCodeWraith11-Apr-18 5:01 
GeneralRe: Worst use of var I've seen... Pin
Nathan Minier11-Apr-18 5:11
professionalNathan Minier11-Apr-18 5:11 
GeneralRe: Worst use of var I've seen... Pin
HobbyProggy10-Apr-18 1:56
professionalHobbyProggy10-Apr-18 1:56 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel10-Apr-18 7:39
professionalSander Rossel10-Apr-18 7:39 
GeneralRe: Worst use of var I've seen... Pin
HobbyProggy10-Apr-18 19:38
professionalHobbyProggy10-Apr-18 19:38 
GeneralRe: Worst use of var I've seen... Pin
Jörgen Andersson9-Apr-18 22:08
professionalJörgen Andersson9-Apr-18 22:08 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel9-Apr-18 23:50
professionalSander Rossel9-Apr-18 23:50 
GeneralRe: Worst use of var I've seen... Pin
Jörgen Andersson10-Apr-18 2:36
professionalJörgen Andersson10-Apr-18 2:36 
GeneralRe: Worst use of var I've seen... Pin
Sander Rossel10-Apr-18 7:37
professionalSander Rossel10-Apr-18 7:37 

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.