D
Doker
Simple vb code:
<STAThread> _
Public Shared Sub Main()
Dim g As Integer = 3
Console.WriteLine(g)
End Sub
avaluates to:
..method public static void Main() cil managed
{
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor()
.entrypoint
.maxstack 1
.locals init (
[0] int32 g)
L_0000: ldc.i4.3
L_0001: stloc.0
L_0002: ldloc.0
L_0003: call void [mscorlib]System.Console::WriteLine(int32)
L_0008: ret
}
Look at lines 00 to 02
Load to eval stack
load off from the stack
load back to the eval stack
This code was generated with vb.net 2.0 in release mode with
optimizations enabled.
What is the meaning of this? Why is this done when it seams to by a
waste of pc power only?
<STAThread> _
Public Shared Sub Main()
Dim g As Integer = 3
Console.WriteLine(g)
End Sub
avaluates to:
..method public static void Main() cil managed
{
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor()
.entrypoint
.maxstack 1
.locals init (
[0] int32 g)
L_0000: ldc.i4.3
L_0001: stloc.0
L_0002: ldloc.0
L_0003: call void [mscorlib]System.Console::WriteLine(int32)
L_0008: ret
}
Look at lines 00 to 02
Load to eval stack
load off from the stack
load back to the eval stack
This code was generated with vb.net 2.0 in release mode with
optimizations enabled.
What is the meaning of this? Why is this done when it seams to by a
waste of pc power only?