Skip to content

Instantly share code, notes, and snippets.

@biggyspender
Created May 17, 2018 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biggyspender/653b1be91e0571613377191b6e9f6366 to your computer and use it in GitHub Desktop.
Save biggyspender/653b1be91e0571613377191b6e9f6366 to your computer and use it in GitHub Desktop.
IL_0000: ldloca.s 00
IL_0002: initobj System.Nullable<System.Int32>
IL_0008: ldloc.0
IL_0009: stloc.0
IL_000A: ldloca.s 00
IL_000C: call System.Nullable<System.Int32>.get_HasValue
IL_0011: brtrue.s IL_0016
IL_0013: ldnull
IL_0014: br.s IL_0022
IL_0016: ldloca.s 00
IL_0018: call System.Nullable<System.Int32>.GetValueOrDefault
IL_001D: call UserQuery+Sample<System.Int32>.op_Implicit
IL_0022: call LINQPad.Extensions.Dump<Sample`1>
IL_0027: pop
IL_0028: ret
Sample`1.op_Implicit:
IL_0000: ldarg.0
IL_0001: newobj UserQuery+Sample<>..ctor
IL_0006: ret
Sample`1..ctor:
IL_0000: ldarg.0
IL_0001: call System.Object..ctor
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld UserQuery+Sample<>.Value
IL_000D: ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment