Click here to Skip to main content
14,177,020 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Programmers that think they're smart Pin
Munchies_Matt9-Feb-19 5:18
memberMunchies_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
protectorRichard MacCutchan9-Feb-19 23:17 
GeneralRe: Programmers that think they're smart Pin
BryanFazekas11-Feb-19 1:46
memberBryanFazekas11-Feb-19 1:46 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan11-Feb-19 1:51
protectorRichard MacCutchan11-Feb-19 1:51 
GeneralRe: Programmers that think they're smart Pin
BryanFazekas11-Feb-19 2:04
memberBryanFazekas11-Feb-19 2:04 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan11-Feb-19 2:43
protectorRichard 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:

{
    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:

{
#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 Pin
OriginalGriff9-Feb-19 6:01
protectorOriginalGriff9-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
professionalMike Hankey9-Feb-19 11:21 
GeneralRe: Programmers that think they're smart Pin
Tachyonx9-Feb-19 9:33
memberTachyonx9-Feb-19 9:33 
GeneralRe: Programmers that think they're smart Pin
F-ES Sitecore9-Feb-19 10:48
mveF-ES Sitecore9-Feb-19 10:48 
GeneralRe: Programmers that think they're smart Pin
Member 916705710-Feb-19 21:05
memberMember 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
memberAndré Pereira10-Feb-19 23:18 
GeneralRe: Programmers that think they're smart Pin
sickfile11-Feb-19 2:30
membersickfile11-Feb-19 2:30 
GeneralRe: Programmers that think they're smart Pin
André Pereira11-Feb-19 3:57
memberAndré Pereira11-Feb-19 3:57 
GeneralRe: Programmers that think they're smart Pin
englebart11-Feb-19 2:58
memberenglebart11-Feb-19 2:58 
GeneralRe: Programmers that think they're smart Pin
ormonds11-Feb-19 12:19
memberormonds11-Feb-19 12:19 
GeneralRe: Programmers that think they're smart Pin
James Lonero11-Feb-19 12:38
memberJames Lonero11-Feb-19 12:38 
GeneralUseless IoT item of the weekend Pin
OriginalGriff8-Feb-19 22:25
protectorOriginalGriff8-Feb-19 22:25 
GeneralRe: Useless IoT item of the weekend Pin
Mark_Wallace9-Feb-19 0:53
memberMark_Wallace9-Feb-19 0:53 
GeneralRe: Useless IoT item of the weekend Pin
Lopatir9-Feb-19 1:20
memberLopatir9-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.


Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.190526.1 | Last Updated 26 May 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid