¡@

Home 

c# Programming Glossary: ldloc.0

Performance difference for control structures 'for' and 'foreach' in C#

http://stackoverflow.com/questions/1124753/performance-difference-for-control-structures-for-and-foreach-in-c-sharp

Enumerator object get_Current IL_0010 stloc.0 IL_0011 ldloc.0 IL_0012 call void mscorlib System.Console WriteLine object IL_0017.. IL_0007 ldloc.2 IL_0008 ldelem.ref IL_0009 stloc.0 IL_000a ldloc.0 IL_000b call void mscorlib System.Console WriteLine object IL_0010..

When using object initializers, why does the compiler generate an extra local variable?

http://stackoverflow.com/questions/1679780/when-using-object-initializers-why-does-the-compiler-generate-an-extra-local-va

void ClassLibrary1.Class1 .ctor L_0005 stloc.0 L_0006 ldloc.0 L_0007 ldstr fooBar L_000c callvirt instance void ClassLibrary1.Class1.. set_Foo string L_0022 ldloc.2 L_0023 stloc.1 L_0024 ldloc.0 L_0025 callvirt instance string ClassLibrary1.Class1 get_Foo..

Does using “new” on a strict allocate it on the heap or stack?

http://stackoverflow.com/questions/203695/does-using-new-on-a-strict-allocate-it-on-the-heap-or-stack

ldloca.s guid L_0003 initobj mscorlib System.Guid L_0009 ldloc.0 L_000a call void Test MethodTakingGuid valuetype mscorlib System.Guid..

Lock statement vs Monitor.Enter method

http://stackoverflow.com/questions/2837070/lock-statement-vs-monitor-enter-method

L_0016 stloc.1 L_0017 ldc.i4.0 L_0018 stloc.3 L_0019 ldloc.0 L_001a dup L_001b stloc.s CS 2 0000 L_001d ldloca.s s__LockTaken0..

Scope of variables in C#

http://stackoverflow.com/questions/3979493/scope-of-variables-in-c-sharp

c Declare c IL_0000 ldc.i4.3 IL_0001 stloc.0 IL_0002 ldloc.0 IL_0003 ldc.i4.1 IL_0004 ble.s IL_000c IL_0006 ldc.i4.2 IL_0007.. ble.s IL_000c IL_0006 ldc.i4.2 IL_0007 stloc.1 IL_0008 ldloc.0 IL_0009 ldloc.1 IL_000a add IL_000b stloc.0 IL_000c ldc.i4.s.. stloc.0 IL_000c ldc.i4.s 10 IL_000e stloc.2 IL_000f ldloc.0 IL_0010 ldloc.2 IL_0011 add IL_0012 call void mscorlib System.Console..

What really happens in a try { return x; } finally { x = null; } statement?

http://stackoverflow.com/questions/421797/what-really-happens-in-a-try-return-x-finally-x-null-statement

L_0008 call void Program Foo L_000d endfinally L_000e ldloc.0 L_000f ret .try L_0000 to L_0008 finally handler L_0008 to L_000e..

Is there any performance difference between ++i and i++ in C#?

http://stackoverflow.com/questions/467322/is-there-any-performance-difference-between-i-and-i-in-c

ldc.i4.0 IL_0003 stloc.0 IL_0004 br.s IL_0010 IL_0006 ldloc.0 IL_0007 call void mscorlib System.Console WriteLine int32 IL_000c.. call void mscorlib System.Console WriteLine int32 IL_000c ldloc.0 IL_000d ldc.i4.1 IL_000e add IL_000f stloc.0 IL_0010 ldloc.0.. IL_000d ldc.i4.1 IL_000e add IL_000f stloc.0 IL_0010 ldloc.0 IL_0011 ldc.i4 0x100000 IL_0016 blt.s IL_0006 Start of second..

Why GetType returns System.Int32 instead of Nullable<Int32>?

http://stackoverflow.com/questions/6931783/why-gettype-returns-system-int32-instead-of-nullableint32

System.Int32 ..ctor Console.WriteLine x.GetType IL_0008 ldloc.0 IL_0009 box System.Nullable System.Int32 IL_000E callvirt System.Object.GetType..

Why is the C# compiler emitting a callvirt instruction for a GetType() method call?

http://stackoverflow.com/questions/845657/why-is-the-c-sharp-compiler-emitting-a-callvirt-instruction-for-a-gettype-meth

void mscorlib System.Object .ctor L_0006 stloc.0 L_0007 ldloc.0 L_0008 callvirt instance class mscorlib System.Type mscorlib..

Why this compile error

http://stackoverflow.com/questions/8823427/why-this-compile-error

exactly the same. IL_0000 ldstr C IL_0005 stloc.0 IL_0006 ldloc.0 IL_0007 call System.String.IsNullOrEmpty IL_000C brtrue.s IL_0015.. IL_000C brtrue.s IL_0015 IL_000E ldloc.0 IL_000F call System.IO.Path.GetDirectoryName EDIT Forgot to..