Click here to Skip to main content
15,887,267 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: c# var Pin
User 1106097923-Jun-20 3:50
User 1106097923-Jun-20 3:50 
AnswerRe: c# var PinPopular
obermd23-Jun-20 4:14
obermd23-Jun-20 4:14 
AnswerRe: c# var Pin
Wendelius23-Jun-20 4:48
mentorWendelius23-Jun-20 4:48 
GeneralRe: c# var Pin
Richard Deeming23-Jun-20 4:53
mveRichard Deeming23-Jun-20 4:53 
AnswerRe: c# var Pin
Pete O'Hanlon23-Jun-20 5:08
mvePete O'Hanlon23-Jun-20 5:08 
GeneralRe: c# var Pin
Nelek23-Jun-20 5:31
protectorNelek23-Jun-20 5:31 
AnswerRe: c# var Pin
rnbergren23-Jun-20 5:56
rnbergren23-Jun-20 5:56 
GeneralRe: c# var PinPopular
OriginalGriff23-Jun-20 6:31
mveOriginalGriff23-Jun-20 6:31 
The problem with that is that you are working to what should have been a breaking change. And that's important, because if you were assuming int division as a result of the original type spec for example, then a breaking change means you know it's just failed and can adapt to it.
var in that case means you don't know, and output can be subtly wrong and unnoticed until it's a real problem.

I'd say var should be there for temporary storage of Linq results, and nowhere else ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

GeneralRe: c# var Pin
pkfox23-Jun-20 20:52
professionalpkfox23-Jun-20 20:52 
AnswerRe: c# var Pin
PIEBALDconsult23-Jun-20 6:37
mvePIEBALDconsult23-Jun-20 6:37 
AnswerRe: c# var Pin
MadMyche23-Jun-20 8:21
professionalMadMyche23-Jun-20 8:21 
GeneralRe: c# var Pin
ZurdoDev23-Jun-20 8:29
professionalZurdoDev23-Jun-20 8:29 
GeneralRe: c# var Pin
MadMyche23-Jun-20 11:31
professionalMadMyche23-Jun-20 11:31 
GeneralRe: c# var Pin
ZurdoDev23-Jun-20 11:42
professionalZurdoDev23-Jun-20 11:42 
AnswerRe: c# var Pin
Mycroft Holmes23-Jun-20 12:28
professionalMycroft Holmes23-Jun-20 12:28 
GeneralRe: c# var Pin
Sander Rossel23-Jun-20 21:53
professionalSander Rossel23-Jun-20 21:53 
GeneralRe: c# var Pin
Mycroft Holmes24-Jun-20 12:20
professionalMycroft Holmes24-Jun-20 12:20 
AnswerRe: c# var Pin
Sander Rossel23-Jun-20 21:49
professionalSander Rossel23-Jun-20 21:49 
AnswerRe: c# var Pin
Steve Naidamast24-Jun-20 4:25
professionalSteve Naidamast24-Jun-20 4:25 
AnswerRe: c# var Pin
Rusty Bullet24-Jun-20 5:10
Rusty Bullet24-Jun-20 5:10 
AnswerRe: c# var Pin
Michael Waters24-Jun-20 5:44
Michael Waters24-Jun-20 5:44 
AnswerRe: c# var Pin
Davyd McColl24-Jun-20 6:00
Davyd McColl24-Jun-20 6:00 
AnswerRe: c# var Pin
salz15024-Jun-20 6:20
salz15024-Jun-20 6:20 
AnswerRe: c# var Pin
Member 289602024-Jun-20 7:24
Member 289602024-Jun-20 7:24 
GeneralRe: c# var Pin
ZurdoDev24-Jun-20 7:39
professionalZurdoDev24-Jun-20 7:39 

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.