Click here to Skip to main content
15,905,414 members
Home / Discussions / C#
   

C#

 
QuestionJanus.Windows.GridEX.GridEX Pin
DotNetDev201328-Apr-13 2:23
DotNetDev201328-Apr-13 2:23 
GeneralIncrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 1:10
N8tiv28-Apr-13 1:10 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
NotPolitcallyCorrect28-Apr-13 1:16
NotPolitcallyCorrect28-Apr-13 1:16 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 1:25
N8tiv28-Apr-13 1:25 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
NotPolitcallyCorrect28-Apr-13 1:29
NotPolitcallyCorrect28-Apr-13 1:29 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 1:32
N8tiv28-Apr-13 1:32 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
NotPolitcallyCorrect28-Apr-13 1:39
NotPolitcallyCorrect28-Apr-13 1:39 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 1:51
N8tiv28-Apr-13 1:51 
"Console.WriteLine(z); // result = 110"

After reading the book, that line right there makes sense to me.
It said something similar to, "you evaluate the expression before you do that decrement".

I get that part, the way the expression was written I understand that.

So when we write the next line to the console, "Console.WriteLine(y);"
the variable y automagically turned into 99?
y is declared at 100. I just don't see how it could automagically turn into 99 without some sort of loop.
y-- is used in an expression, not used as a declared variable.
I think that's where I'm getting confused.

Maybe I've just seen too many YouTube videos where they are using incrementing and decrementing with loops.

<a href="http://www.widmarkrob.com">My Coding Journey</a>
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
NotPolitcallyCorrect28-Apr-13 2:10
NotPolitcallyCorrect28-Apr-13 2:10 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
Dave Kreskowiak28-Apr-13 4:48
mveDave Kreskowiak28-Apr-13 4:48 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 1:47
harold aptroot28-Apr-13 1:47 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 2:00
N8tiv28-Apr-13 2:00 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 2:23
harold aptroot28-Apr-13 2:23 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 2:35
N8tiv28-Apr-13 2:35 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
N8tiv28-Apr-13 3:05
N8tiv28-Apr-13 3:05 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 3:33
harold aptroot28-Apr-13 3:33 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
OriginalGriff28-Apr-13 3:44
mveOriginalGriff28-Apr-13 3:44 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 3:54
harold aptroot28-Apr-13 3:54 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
OriginalGriff28-Apr-13 4:15
mveOriginalGriff28-Apr-13 4:15 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 4:19
harold aptroot28-Apr-13 4:19 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
OriginalGriff28-Apr-13 4:26
mveOriginalGriff28-Apr-13 4:26 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 4:31
harold aptroot28-Apr-13 4:31 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
OriginalGriff28-Apr-13 4:46
mveOriginalGriff28-Apr-13 4:46 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
harold aptroot28-Apr-13 4:59
harold aptroot28-Apr-13 4:59 
GeneralRe: Incrementing and Decrementing - Just Trying to Understand Pin
OriginalGriff28-Apr-13 5:08
mveOriginalGriff28-Apr-13 5:08 

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.