Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Beginning Visual C# 2005
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual C# 2005
This is the forum to discuss the Wrox book Beginning Visual C# 2005 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780764578472
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 7th, 2010, 04:37 AM
Registered User
 
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default A question about the post-++

I just begin to learn C#,and before that,i have learnded C++.
I want to konw How to achieve the operator post-++(in C#).
I know in C++ ,for exp:
int a = 0;
int b = a++;

is the same as:
int a = 0;
int temp = a;
a += 1;
int b = temp;

In C#,post-++ has a lower priority than operator =,so how would the post-++ work?( Sorry for my poor English:-) )

My suppose is:
int a = 0;
int b = a;
a +=1;
Reply With Quote
  #2 (permalink)  
Old January 7th, 2010, 09:37 AM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you want a value of 1 in a and a value of 0 in b then

in C# or C++

Code:
int a = 0;
int b = a++;
will both give the same results.
Reply With Quote
  #3 (permalink)  
Old January 7th, 2010, 09:07 PM
Registered User
 
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks,

I know they have a same result both in C++ and C#.

And it's just a example.
I want to know sth more detail:How the post-++ work in C#

Maybe i will know that after i read the chapter about function overload
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I was not sure where to post this iceman90289 C# 2005 1 March 26th, 2008 03:19 AM
Question on HTTP Post dgrumbli BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 3 December 20th, 2006 02:03 PM
Old post from a year ago, had question plz galacticsoul General .NET 0 August 4th, 2006 12:01 PM
vbscript question (not sure where to post this) interrupt Javascript How-To 0 February 14th, 2006 10:38 AM



All times are GMT -4. The time now is 12:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.