Click here to Skip to main content
15,903,385 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual studio 2015 addins to edit yaml files Pin
Richard Deeming24-Mar-17 5:50
mveRichard Deeming24-Mar-17 5:50 
QuestionC# WebBrowser Control Pin
Member 231220524-Mar-17 2:25
Member 231220524-Mar-17 2:25 
AnswerRe: C# WebBrowser Control Pin
Richard Deeming24-Mar-17 3:12
mveRichard Deeming24-Mar-17 3:12 
PraiseRe: C# WebBrowser Control Pin
Ravi Bhavnani25-Mar-17 10:01
professionalRavi Bhavnani25-Mar-17 10:01 
QuestionVery Simple Question Pin
Member 1307971223-Mar-17 4:12
Member 1307971223-Mar-17 4:12 
AnswerRe: Very Simple Question Pin
Jochen Arndt23-Mar-17 4:25
professionalJochen Arndt23-Mar-17 4:25 
AnswerRe: Very Simple Question Pin
Richard MacCutchan23-Mar-17 4:29
mveRichard MacCutchan23-Mar-17 4:29 
AnswerRe: Very Simple Question Pin
Pete O'Hanlon23-Mar-17 4:30
mvePete O'Hanlon23-Mar-17 4:30 
No, in that position, the ++ is a Postfix operator. In other words, it acts to increment x after the operation (in this case, assigning x to y). Effectively, this is the same as this:
C#
int y = x; x += 1
If we break this down into the corresponding IL, we can see what's going on. First, the version I just showed broken down:
  .entrypoint
.maxstack 2
.locals init (
    [0] int32 x,
    [1] int32 y)
L_0000: nop
L_0001: ldc.i4.s 10
L_0003: stloc.0
L_0004: ldloc.0
L_0005: stloc.1
L_0006: ldloc.0
L_0007: ldc.i4.1
L_0008: add
L_0009: stloc.0
L_000a: ret
Then, the version of int y = x++;
.entrypoint
.maxstack 3
.locals init (
    [0] int32 x,
    [1] int32 y)
L_0000: nop
L_0001: ldc.i4.s 10
L_0003: stloc.0
L_0004: ldloc.0
L_0005: dup
L_0006: ldc.i4.1
L_0007: add
L_0008: stloc.0
L_0009: stloc.1
L_000a: ret
As you can see, the two methods produce almost identical IL.
This space for rent

AnswerRe: Very Simple Question Pin
Gerry Schmitz23-Mar-17 17:38
mveGerry Schmitz23-Mar-17 17:38 
AnswerRe: Very Simple Question Pin
V.23-Mar-17 20:19
professionalV.23-Mar-17 20:19 
GeneralRe: Very Simple Question Pin
Richard MacCutchan23-Mar-17 22:43
mveRichard MacCutchan23-Mar-17 22:43 
AnswerRe: Very Simple Question Pin
OriginalGriff23-Mar-17 23:36
mveOriginalGriff23-Mar-17 23:36 
Questionmessagebox problem when process completed Pin
Akshit.b23-Mar-17 0:17
Akshit.b23-Mar-17 0:17 
AnswerRe: messagebox problem when process completed Pin
Richard MacCutchan23-Mar-17 2:08
mveRichard MacCutchan23-Mar-17 2:08 
AnswerRe: messagebox problem when process completed Pin
Dave Kreskowiak23-Mar-17 2:43
mveDave Kreskowiak23-Mar-17 2:43 
AnswerRe: messagebox problem when process completed Pin
Gerry Schmitz23-Mar-17 17:41
mveGerry Schmitz23-Mar-17 17:41 
AnswerRe: messagebox problem when process completed Pin
Luc Pattyn24-Mar-17 4:27
sitebuilderLuc Pattyn24-Mar-17 4:27 
GeneralRe: messagebox problem when process completed Pin
Akshit.b26-Mar-17 20:22
Akshit.b26-Mar-17 20:22 
QuestionHow to write a generic code to make async call to Rest Service Pin
ArunHanu22-Mar-17 0:31
ArunHanu22-Mar-17 0:31 
AnswerRe: How to write a generic code to make async call to Rest Service Pin
Nathan Minier22-Mar-17 1:13
professionalNathan Minier22-Mar-17 1:13 
GeneralRe: How to write a generic code to make async call to Rest Service Pin
ArunHanu22-Mar-17 1:43
ArunHanu22-Mar-17 1:43 
GeneralRe: How to write a generic code to make async call to Rest Service Pin
Pete O'Hanlon22-Mar-17 2:03
mvePete O'Hanlon22-Mar-17 2:03 
GeneralRe: How to write a generic code to make async call to Rest Service Pin
Nathan Minier22-Mar-17 2:08
professionalNathan Minier22-Mar-17 2:08 
SuggestionRe: How to write a generic code to make async call to Rest Service Pin
Richard Deeming22-Mar-17 2:23
mveRichard Deeming22-Mar-17 2:23 
GeneralRe: How to write a generic code to make async call to Rest Service Pin
ArunHanu22-Mar-17 3:06
ArunHanu22-Mar-17 3:06 

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.