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

 
Questionc# var PinPopular
ZurdoDev23-Jun-20 3:10
professionalZurdoDev23-Jun-20 3:10 
AnswerRe: c# var PinPopular
F-ES Sitecore23-Jun-20 3:20
professionalF-ES Sitecore23-Jun-20 3:20 
GeneralRe: c# var Pin
megaadam23-Jun-20 5:12
professionalmegaadam23-Jun-20 5:12 
AnswerRe: c# var PinPopular
Greg Utas23-Jun-20 3:21
professionalGreg Utas23-Jun-20 3:21 
GeneralRe: c# var Pin
Mircea Neacsu23-Jun-20 9:25
Mircea Neacsu23-Jun-20 9:25 
GeneralRe: c# var Pin
Greg Utas23-Jun-20 9:38
professionalGreg Utas23-Jun-20 9:38 
AnswerRe: c# var Pin
GuyThiebaut23-Jun-20 3:21
professionalGuyThiebaut23-Jun-20 3:21 
GeneralRe: c# var Pin
obermd23-Jun-20 4:15
obermd23-Jun-20 4:15 
GuyThiebaut wrote:
The advantage of var is if "<a href="http://someapi">http://someapi</a>" was a variable or class instance instead of a string literal and you changed its type, you would not then need to refactor the code elsewhere.


Absolutely not true. Changing a data type and then attempting to use it elsewhere is guaranteed to cause you to have to modify code everywhere it's used. Fortunately the VS IDE is smart enough to identify those spots for you.
GeneralRe: c# var Pin
GuyThiebaut23-Jun-20 4:39
professionalGuyThiebaut23-Jun-20 4:39 
GeneralRe: c# var Pin
BillWoodruff24-Jun-20 0:48
professionalBillWoodruff24-Jun-20 0:48 
GeneralRe: c# var Pin
GuyThiebaut24-Jun-20 2:34
professionalGuyThiebaut24-Jun-20 2:34 
AnswerRe: c# var PinPopular
Marc Clifton23-Jun-20 3:21
mvaMarc Clifton23-Jun-20 3:21 
GeneralRe: c# var Pin
ZurdoDev23-Jun-20 3:29
professionalZurdoDev23-Jun-20 3:29 
GeneralRe: c# var PinPopular
OriginalGriff23-Jun-20 3:41
mveOriginalGriff23-Jun-20 3:41 
GeneralRe: c# var Pin
obermd23-Jun-20 4:18
obermd23-Jun-20 4:18 
GeneralRe: c# var Pin
Richard Deeming23-Jun-20 4:51
mveRichard Deeming23-Jun-20 4:51 
GeneralRe: c# var Pin
OriginalGriff23-Jun-20 4:59
mveOriginalGriff23-Jun-20 4:59 
GeneralRe: c# var Pin
Nelek23-Jun-20 5:25
protectorNelek23-Jun-20 5:25 
GeneralRe: c# var Pin
Marc Clifton23-Jun-20 5:25
mvaMarc Clifton23-Jun-20 5:25 
GeneralRe: c# var Pin
BillWoodruff24-Jun-20 0:52
professionalBillWoodruff24-Jun-20 0:52 
GeneralRe: c# var Pin
pkfox23-Jun-20 20:46
professionalpkfox23-Jun-20 20:46 
GeneralRe: c# var Pin
Fabio Franco24-Jun-20 12:32
professionalFabio Franco24-Jun-20 12:32 
GeneralRe: c# var Pin
David On Life24-Jun-20 14:03
David On Life24-Jun-20 14:03 
GeneralRe: c# var Pin
dandy7223-Jun-20 7:16
dandy7223-Jun-20 7:16 
AnswerRe: c# var Pin
Slacker00723-Jun-20 3:24
professionalSlacker00723-Jun-20 3:24 

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.