You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When outputting signature of entry point method as CIL assembler code, it should be marked with .entrypoint directive.
Example code:
using System;
using System.Reflection;
using CilBytecodeParser;
class Program
{
public static void Main(string[] args)
{
Console.WriteLine(CilAnalysis.MethodToText(MethodBase.GetCurrentMethod()));
Console.ReadKey();
}
}
Current output:
.method public hidebysig static void Main(
string[] args
) cil managed {
.maxstack 8
nop
call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetCurrentMethod()
call string [CilBytecodeParser]CilBytecodeParser.CilAnalysis::MethodToText(class [mscorlib]System.Reflection.MethodBase)
call void [mscorlib]System.Console::WriteLine(string)
nop
call valuetype [mscorlib]System.ConsoleKeyInfo [mscorlib]System.Console::ReadKey()
pop
ret
}
Expected output:
.method public hidebysig static void Main(
string[] args
) cil managed {
.entrypoint
.maxstack 8
nop
call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetCurrentMethod()
call string [CilBytecodeParser]CilBytecodeParser.CilAnalysis::MethodToText(class [mscorlib]System.Reflection.MethodBase)
call void [mscorlib]System.Console::WriteLine(string)
nop
call valuetype [mscorlib]System.ConsoleKeyInfo [mscorlib]System.Console::ReadKey()
pop
ret
}
The Assembly.EntryPoint property can be used to determine what method is an entry point in the given assembly.
Relevant ECMA-335 Specification section: II.15.4.1.2 The .entrypoint directive.
The text was updated successfully, but these errors were encountered:
When outputting signature of entry point method as CIL assembler code, it should be marked with
.entrypoint
directive.Example code:
Current output:
Expected output:
The Assembly.EntryPoint property can be used to determine what method is an entry point in the given assembly.
Relevant ECMA-335 Specification section: II.15.4.1.2 The .entrypoint directive.
The text was updated successfully, but these errors were encountered: