Created
November 16, 2012 09:59
-
-
Save davunderscorei/4086085 to your computer and use it in GitHub Desktop.
; vs = null;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IL_0001: newobj UserQuery+Class..ctor | |
IL_0006: stloc.0 | |
IL_0007: ldloc.0 | |
IL_0008: ldc.i4.3 | |
IL_0009: newobj UserQuery+MyObject..ctor | |
IL_000E: stfld UserQuery+Class.asdf | |
IL_0013: ldloc.0 | |
IL_0014: call LINQPad.Extensions.Dump | |
Class..ctor: | |
IL_0000: ldarg.0 | |
IL_0001: call System.Object..ctor | |
IL_0006: ret | |
MyObject.get_Value: | |
IL_0000: ldarg.0 | |
IL_0001: ldfld UserQuery+MyObject.<Value>k__BackingField | |
IL_0006: stloc.0 | |
IL_0007: br.s IL_0009 | |
IL_0009: ldloc.0 | |
IL_000A: ret | |
MyObject.set_Value: | |
IL_0000: ldarg.0 | |
IL_0001: ldarg.1 | |
IL_0002: stfld UserQuery+MyObject.<Value>k__BackingField | |
IL_0007: ret | |
MyObject..ctor: | |
IL_0000: ldarg.0 | |
IL_0001: call System.Object..ctor | |
IL_0006: nop | |
IL_0007: nop | |
IL_0008: ldarg.0 | |
IL_0009: ldarg.1 | |
IL_000A: call UserQuery+MyObject.set_Value | |
IL_000F: nop | |
IL_0010: nop | |
IL_0011: ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IL_0001: newobj UserQuery+Class..ctor | |
IL_0006: stloc.0 | |
IL_0007: ldloc.0 | |
IL_0008: ldc.i4.3 | |
IL_0009: newobj UserQuery+MyObject..ctor | |
IL_000E: stfld UserQuery+Class.asdf | |
IL_0013: ldloc.0 | |
IL_0014: call LINQPad.Extensions.Dump | |
Class..ctor: | |
IL_0000: ldarg.0 | |
IL_0001: ldnull | |
IL_0002: stfld UserQuery+Class.asdf | |
IL_0007: ldarg.0 | |
IL_0008: call System.Object..ctor | |
IL_000D: nop | |
IL_000E: ret | |
MyObject.get_Value: | |
IL_0000: ldarg.0 | |
IL_0001: ldfld UserQuery+MyObject.<Value>k__BackingField | |
IL_0006: stloc.0 | |
IL_0007: br.s IL_0009 | |
IL_0009: ldloc.0 | |
IL_000A: ret | |
MyObject.set_Value: | |
IL_0000: ldarg.0 | |
IL_0001: ldarg.1 | |
IL_0002: stfld UserQuery+MyObject.<Value>k__BackingField | |
IL_0007: ret | |
MyObject..ctor: | |
IL_0000: ldarg.0 | |
IL_0001: call System.Object..ctor | |
IL_0006: nop | |
IL_0007: nop | |
IL_0008: ldarg.0 | |
IL_0009: ldarg.1 | |
IL_000A: call UserQuery+MyObject.set_Value | |
IL_000F: nop | |
IL_0010: nop | |
IL_0011: ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
Class myClass = new Class(); | |
myClass.asdf = new MyObject(3); | |
myClass.Dump(); | |
} | |
// Define other methods and classes here | |
public class Class | |
{ | |
public MyObject asdf//; or = null; | |
} | |
public class MyObject | |
{ | |
public int Value { get; set; } | |
public MyObject(int value) | |
{ | |
this.Value = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment