Click here to Skip to main content
15,921,905 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: C# Object Initializer Syntax Pin
#realJSOP24-Aug-16 2:09
professional#realJSOP24-Aug-16 2:09 
GeneralRe: C# Object Initializer Syntax Pin
Richard Deeming24-Aug-16 2:18
mveRichard Deeming24-Aug-16 2:18 
GeneralRe: C# Object Initializer Syntax Pin
#realJSOP24-Aug-16 2:29
professional#realJSOP24-Aug-16 2:29 
GeneralRe: C# Object Initializer Syntax Pin
Fabio Franco25-Aug-16 9:25
professionalFabio Franco25-Aug-16 9:25 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 1:41
CDP180224-Aug-16 1:41 
GeneralRe: C# Object Initializer Syntax Pin
Jacquers24-Aug-16 1:59
Jacquers24-Aug-16 1:59 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 2:05
CDP180224-Aug-16 2:05 
GeneralRe: C# Object Initializer Syntax Pin
#realJSOP24-Aug-16 2:13
professional#realJSOP24-Aug-16 2:13 
0) If you can't discern which of the properties is throwing the exception, maybe you should let someone else do the debugging.

1) If you have 400 properties that need to be initialized in an object, maybe you should rethink your design and pass a single model object (or a limited number of model objects) to a constructor and debug in the object being initialized.

2) After my first experience with a null reference exception as a result of a database query, I started writing my stored procs in such a way as to NOT return null values for any column.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013


modified 24-Aug-16 8:20am.

GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 2:24
CDP180224-Aug-16 2:24 
GeneralRe: C# Object Initializer Syntax Pin
Richard Deeming24-Aug-16 2:20
mveRichard Deeming24-Aug-16 2:20 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 2:27
CDP180224-Aug-16 2:27 
GeneralRe: C# Object Initializer Syntax Pin
TheGreatAndPowerfulOz24-Aug-16 3:30
TheGreatAndPowerfulOz24-Aug-16 3:30 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 3:38
CDP180224-Aug-16 3:38 
GeneralRe: C# Object Initializer Syntax Pin
TheGreatAndPowerfulOz24-Aug-16 4:11
TheGreatAndPowerfulOz24-Aug-16 4:11 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 4:16
CDP180224-Aug-16 4:16 
GeneralRe: C# Object Initializer Syntax Pin
Ian Shlasko24-Aug-16 3:20
Ian Shlasko24-Aug-16 3:20 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 3:23
CDP180224-Aug-16 3:23 
GeneralRe: C# Object Initializer Syntax Pin
Ian Shlasko24-Aug-16 3:29
Ian Shlasko24-Aug-16 3:29 
GeneralRe: C# Object Initializer Syntax Pin
CDP180224-Aug-16 3:44
CDP180224-Aug-16 3:44 
GeneralRe: C# Object Initializer Syntax Pin
TheGreatAndPowerfulOz24-Aug-16 3:18
TheGreatAndPowerfulOz24-Aug-16 3:18 
JokeRe: C# Object Initializer Syntax Pin
Rage24-Aug-16 5:37
professionalRage24-Aug-16 5:37 
GeneralRe: C# Object Initializer Syntax Pin
Kiriander24-Aug-16 21:16
Kiriander24-Aug-16 21:16 
GeneralRe: C# Object Initializer Syntax Pin
Middle Manager25-Aug-16 2:21
Middle Manager25-Aug-16 2:21 
GeneralRe: C# Object Initializer Syntax Pin
Gerry Schmitz25-Aug-16 5:43
mveGerry Schmitz25-Aug-16 5:43 
GeneralRe: C# Object Initializer Syntax Pin
Kirk 1038982125-Aug-16 3:54
Kirk 1038982125-Aug-16 3:54 

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.