Hi, I'm writing a reflection tool that I'll use for invoking methods from various types, and I'm testing it on simple programs.
I'm curious as why it doesn't return my Main()
method on standard Visual Studio generated Program class
class Program
{
static void Main(string[] args)
{ return ; }
When I load type Program
, and call type.GetMethods()
; it returns 4 methods inherited from Object
: ToString
, GetHashCode
, GetType
and Equals
.
I'm guessing Main
is a special method as it's program's entry point, but there should be a way to retrieve its MethodInfo
. Is there a way to get it?