Click here to Skip to main content
15,918,976 members
Home / Discussions / C#
   

C#

 
QuestionHow to use Multicoloms In ListBox Pin
pashitech21-Mar-07 3:29
pashitech21-Mar-07 3:29 
AnswerRe: How to use Multicoloms In ListBox Pin
Laxman Auti21-Mar-07 4:27
Laxman Auti21-Mar-07 4:27 
QuestionSPI_SETWORKAREA Problems Pin
AndyBob21-Mar-07 3:26
AndyBob21-Mar-07 3:26 
GeneralLayout Pin
V.21-Mar-07 2:52
professionalV.21-Mar-07 2:52 
GeneralRe: Layout Pin
Laxman Auti21-Mar-07 3:18
Laxman Auti21-Mar-07 3:18 
GeneralRe: Layout Pin
V.21-Mar-07 4:35
professionalV.21-Mar-07 4:35 
GeneralRe: Layout Pin
Laxman Auti21-Mar-07 5:01
Laxman Auti21-Mar-07 5:01 
Question++x + x and x + ++x [modified] Pin
Varibrus21-Mar-07 2:44
Varibrus21-Mar-07 2:44 
<br />
            int x = 1;<br />
            int z = ++x + x;<br />
            Console.WriteLine (x.ToString () + "  " + z.ToString ());<br />
<br />
            int x = 1;<br />
            int z1 = x + ++x;<br />
            Console.WriteLine (x.ToString ()  + "  " + z1.ToString ());<br />

Why z is 4, but z1 is 3?

In accordance with
Operators (C# Programming Guide)
The operator ++ has a higher precedence than the operator +. In both cases, ++ must execute at first.

There's not this problem in C++!


Oleg


-- modified at 10:04 Wednesday 21st March, 2007
AnswerRe: ++x + x and x + ++x Pin
Stefan Troschuetz21-Mar-07 3:04
Stefan Troschuetz21-Mar-07 3:04 
AnswerRe: ++x + x and x + ++x Pin
Pete O'Hanlon21-Mar-07 3:08
mvePete O'Hanlon21-Mar-07 3:08 
AnswerRe: ++x + x and x + ++x [modified] Pin
Jimmanuel21-Mar-07 3:08
Jimmanuel21-Mar-07 3:08 
AnswerRe: ++x + x and x + ++x Pin
Laxman Auti21-Mar-07 3:32
Laxman Auti21-Mar-07 3:32 
QuestionMain form with always-on-top flag + dialog Pin
Dominik Reichl21-Mar-07 2:36
Dominik Reichl21-Mar-07 2:36 
AnswerRe: Main form with always-on-top flag + dialog Pin
Stefan Troschuetz21-Mar-07 2:45
Stefan Troschuetz21-Mar-07 2:45 
GeneralRe: Main form with always-on-top flag + dialog Pin
Dominik Reichl21-Mar-07 4:13
Dominik Reichl21-Mar-07 4:13 
GeneralRe: Main form with always-on-top flag + dialog Pin
Stefan Troschuetz21-Mar-07 4:31
Stefan Troschuetz21-Mar-07 4:31 
QuestionProgressive Disclosure Control in windows form using c# Pin
Kumar Subramanian21-Mar-07 2:03
Kumar Subramanian21-Mar-07 2:03 
AnswerRe: Progressive Disclosure Control in windows form using c# Pin
joon vh.21-Mar-07 5:11
joon vh.21-Mar-07 5:11 
QuestionConstructor is instance method? Pin
Russell Jones21-Mar-07 2:00
Russell Jones21-Mar-07 2:00 
AnswerRe: Constructor is instance method? Pin
Pete O'Hanlon21-Mar-07 3:09
mvePete O'Hanlon21-Mar-07 3:09 
GeneralRe: Constructor is instance method? Pin
Russell Jones21-Mar-07 3:19
Russell Jones21-Mar-07 3:19 
GeneralRe: Constructor is instance method? Pin
Pete O'Hanlon21-Mar-07 3:31
mvePete O'Hanlon21-Mar-07 3:31 
GeneralRe: Constructor is instance method? Pin
Russell Jones21-Mar-07 3:45
Russell Jones21-Mar-07 3:45 
GeneralRe: Constructor is instance method? Pin
Pete O'Hanlon21-Mar-07 3:49
mvePete O'Hanlon21-Mar-07 3:49 
Questionevents and remoting Pin
D2raghu21-Mar-07 1:46
D2raghu21-Mar-07 1:46 

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.