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

 
GeneralMessage Removed Pin
25-Oct-16 8:03
professionalN_tro_P25-Oct-16 8:03 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Marc Clifton25-Oct-16 8:17
mvaMarc Clifton25-Oct-16 8:17 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 9:23
professionalEddy Vluggen25-Oct-16 9:23 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Dan Neely25-Oct-16 10:08
Dan Neely25-Oct-16 10:08 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 10:16
professionalEddy Vluggen25-Oct-16 10:16 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Dan Neely25-Oct-16 10:21
Dan Neely25-Oct-16 10:21 
GeneralMessage Removed Pin
25-Oct-16 11:00
professionalN_tro_P25-Oct-16 11:00 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 11:19
professionalEddy Vluggen25-Oct-16 11:19 
N_tro_P wrote:
Actually that is why its good.
It is if you dislike strong typing, in which case you might prefer VB.NET Smile | :)

N_tro_P wrote:
So because you casted it and now have a run time failure it is var's fault?
No, I did not state that; merely that it would be redundant to repeat the type instead of using var.

Do elaborate and please explain what in your eyes I would have blamed on var?

N_tro_P wrote:
The fault is on the guy that casted it when it should have returned as the needed type for the method it is in.
You go ahead and complain with Microsoft, I'll be waiting here for the result.

N_tro_P wrote:
Again, don't be an idiot and it works fine.
The not being an idiot part would IMO be that you verify that you get what you expect, and not to use "var" as a "variant" from VB.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralMessage Removed Pin
25-Oct-16 11:31
professionalN_tro_P25-Oct-16 11:31 
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 
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 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   487 votes