You need to:

ldloca
call get_HasValue

Nullable are value types.

Jb

On Fri, Nov 13, 2015 at 11:34 AM, Austin Brkich <[email protected]> wrote:
> IL_0000: ldarg.0
> IL_0001: call valuetype [mscorlib]System.Nullable`1<bool>
> [PhiScript]PhiScript.Manager.ConstructionComponentManager::OnCanProduce(class
> ['Assembly-CSharp']Planetbase.ConstructionComponent)
> IL_0006: stloc.s 8
> IL_0008: ldloc.s 8
> IL_000a: call instance bool valuetype
> [mscorlib]System.Nullable`1<bool>::get_HasValue()
> IL_000f: brfalse.s IL_0019
>
> IL_0011: ldloc.s 8
> IL_0013: call instance !0 valuetype
> [mscorlib]System.Nullable`1<bool>::get_Value()
> IL_0018: ret
>
>
> This is my section of code that I am inserting. The rest of the Method is
> code that doesn't really matter, but if you need that let me know.
>
> --
> --
> --
> mono-cecil
> ---
> You received this message because you are subscribed to the Google Groups
> "mono-cecil" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to