Click here to Skip to main content
15,902,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak23-Sep-05 16:58
mveDave Kreskowiak23-Sep-05 16:58 
GeneralRe: Strange IL code from simple C# expression Pin
Wjousts24-Sep-05 3:33
Wjousts24-Sep-05 3:33 
GeneralRe: Strange IL code from simple C# expression Pin
Daniel Grunwald24-Sep-05 21:44
Daniel Grunwald24-Sep-05 21:44 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak25-Sep-05 1:37
mveDave Kreskowiak25-Sep-05 1:37 
GeneralRe: Strange IL code from simple C# expression Pin
Wjousts25-Sep-05 3:29
Wjousts25-Sep-05 3:29 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak26-Sep-05 1:20
mveDave Kreskowiak26-Sep-05 1:20 
GeneralRe: Strange IL code from simple C# expression Pin
Wjousts26-Sep-05 6:10
Wjousts26-Sep-05 6:10 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak26-Sep-05 13:57
mveDave Kreskowiak26-Sep-05 13:57 
Wjousts wrote:
No, it's not! i++; is equivilent to i=i+1.

So no, you agree???


Whoops! My typeo. i++ is equivelent to i=i+1. But, that not what i=i++; is saying.


Wjousts wrote:
It's not an issue of execution order because ALL THE STATEMENTS ARE SUPPOSED TO BE EXECUTED!

Yeah, all the statements are supposed to be executed, DUH! The problem is in which order the various PIECES of those statements are executed!

Want proof of the execution order of the expression? One more time...
int i = 5;
Console.WriteLine((i++).ToString());         ' Result:  5
 
int i = 5;
Console.WriteLine((++i).ToString());         ' Result:  6

I understand perfectly what the code is doing and I know exactly why it's coming up with the results it is. It's your argument that I don't get.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Strange IL code from simple C# expression Pin
Wjousts26-Sep-05 23:21
Wjousts26-Sep-05 23:21 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak27-Sep-05 14:25
mveDave Kreskowiak27-Sep-05 14:25 
GeneralRe: Strange IL code from simple C# expression Pin
Wjousts28-Sep-05 15:35
Wjousts28-Sep-05 15:35 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak29-Sep-05 0:29
mveDave Kreskowiak29-Sep-05 0:29 
GeneralRe: Strange IL code from simple C# expression Pin
Dave Kreskowiak23-Sep-05 7:46
mveDave Kreskowiak23-Sep-05 7:46 
QuestionMachine Names on Network Pin
Greeky22-Sep-05 23:11
Greeky22-Sep-05 23:11 
AnswerRe: Machine Names on Network Pin
enjoycrack23-Sep-05 1:22
enjoycrack23-Sep-05 1:22 
QuestionWeb Link in RichTextBox Pin
Greeky22-Sep-05 22:31
Greeky22-Sep-05 22:31 
AnswerRe: Web Link in RichTextBox Pin
enjoycrack23-Sep-05 1:25
enjoycrack23-Sep-05 1:25 
QuestionStraming integer values Pin
Afief22-Sep-05 22:22
Afief22-Sep-05 22:22 
QuestionMultiple Q's, Answer as many as you like. Pin
Anthony Mushrow22-Sep-05 22:07
professionalAnthony Mushrow22-Sep-05 22:07 
AnswerRe: Multiple Q's, Answer as many as you like. Pin
Niklas Ulvinge23-Sep-05 0:45
Niklas Ulvinge23-Sep-05 0:45 
QuestionCREATING AND DELETING DATABSE IN C# .NET Pin
EKJDBA22-Sep-05 22:05
EKJDBA22-Sep-05 22:05 
AnswerRe: CREATING AND DELETING DATABSE IN C# .NET Pin
sreejith ss nair23-Sep-05 2:19
sreejith ss nair23-Sep-05 2:19 
Questiondatagrid invoke and tablestyles Pin
xrado22-Sep-05 21:53
xrado22-Sep-05 21:53 
AnswerRe: datagrid invoke and tablestyles Pin
sreejith ss nair23-Sep-05 2:22
sreejith ss nair23-Sep-05 2:22 
GeneralRe: datagrid invoke and tablestyles Pin
xrado23-Sep-05 7:34
xrado23-Sep-05 7:34 

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.