Click here to Skip to main content
15,895,656 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: Programmers that think they're smart Pin
Munchies_Matt9-Feb-19 5:18
Munchies_Matt9-Feb-19 5:18 
GeneralRe: Programmers that think they're smart Pin
GuyThiebaut9-Feb-19 5:22
professionalGuyThiebaut9-Feb-19 5:22 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan9-Feb-19 23:17
mveRichard MacCutchan9-Feb-19 23:17 
GeneralRe: Programmers that think they're smart Pin
BryanFazekas11-Feb-19 1:46
BryanFazekas11-Feb-19 1:46 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan11-Feb-19 1:51
mveRichard MacCutchan11-Feb-19 1:51 
GeneralRe: Programmers that think they're smart Pin
BryanFazekas11-Feb-19 2:04
BryanFazekas11-Feb-19 2:04 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan11-Feb-19 2:43
mveRichard MacCutchan11-Feb-19 2:43 
GeneralRe: Programmers that think they're smart Pin
#realJSOP9-Feb-19 5:47
mve#realJSOP9-Feb-19 5:47 
As far as I know, the compiler treats that code the same as this:

C#
{
    string data = inputStream.ReadToEnd();
    SomeClass myObj = JsonConvert.Deserialize<SomeClass>(data)
    var processed = Process(myObj);
    return JsonConvert.SerializeObject(processed);
}


even if it didn't precisely, at least you can debug it one step at a time.

You could also do this if you had the itch (but it is fairly pointless:

C#
{
#if DEBUG

    string data = inputStream.ReadToEnd();
    SomeClass myObj = JsonConvert.Deserialize<SomeClass>(data)
    var processed = Process(myObj);
    return JsonConvert.SerializeObject(processed);

#else

    return JsonConvert.SerializeObject(Process(JsonConvert.Deserialize<SomeClass>(inputStream.ReadToEnd())));

#endif
}

".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

GeneralRe: Programmers that think they're smart PinPopular
OriginalGriff9-Feb-19 6:01
mveOriginalGriff9-Feb-19 6:01 
GeneralRe: Programmers that think they're smart Pin
GuyThiebaut9-Feb-19 6:45
professionalGuyThiebaut9-Feb-19 6:45 
GeneralRe: Programmers that think they're smart Pin
#realJSOP9-Feb-19 9:59
mve#realJSOP9-Feb-19 9:59 
GeneralRe: Programmers that think they're smart Pin
Mike Hankey9-Feb-19 11:21
mveMike Hankey9-Feb-19 11:21 
GeneralRe: Programmers that think they're smart Pin
peterkmx9-Feb-19 9:33
professionalpeterkmx9-Feb-19 9:33 
GeneralRe: Programmers that think they're smart Pin
F-ES Sitecore9-Feb-19 10:48
professionalF-ES Sitecore9-Feb-19 10:48 
GeneralRe: Programmers that think they're smart Pin
Member 916705710-Feb-19 21:05
Member 916705710-Feb-19 21:05 
GeneralRe: Programmers that think they're smart Pin
maze310-Feb-19 22:13
professionalmaze310-Feb-19 22:13 
GeneralRe: Programmers that think they're smart Pin
André Pereira10-Feb-19 23:18
André Pereira10-Feb-19 23:18 
GeneralRe: Programmers that think they're smart Pin
Martin ISDN11-Feb-19 2:30
Martin ISDN11-Feb-19 2:30 
GeneralRe: Programmers that think they're smart Pin
André Pereira11-Feb-19 3:57
André Pereira11-Feb-19 3:57 
GeneralRe: Programmers that think they're smart Pin
englebart11-Feb-19 2:58
professionalenglebart11-Feb-19 2:58 
GeneralRe: Programmers that think they're smart Pin
ormonds11-Feb-19 12:19
ormonds11-Feb-19 12:19 
GeneralRe: Programmers that think they're smart Pin
James Lonero11-Feb-19 12:38
James Lonero11-Feb-19 12:38 
GeneralUseless IoT item of the weekend Pin
OriginalGriff8-Feb-19 22:25
mveOriginalGriff8-Feb-19 22:25 
GeneralRe: Useless IoT item of the weekend Pin
Mark_Wallace9-Feb-19 0:53
Mark_Wallace9-Feb-19 0:53 
GeneralRe: Useless IoT item of the weekend Pin
lopatir9-Feb-19 1:20
lopatir9-Feb-19 1:20 

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.