Is static void Main(int a) {...} a valid entry point for C# program ?

Answer : No

Hint :

Entry point method is always named Main, and can have one of the following signatures:


static void Main() {...}

static void Main(string[] args) {...}

static int Main() {...}

static int Main(string[] args) {...}

The entry point may optionally have one formal parameter. The parameter may have any name, but the type of the parameter must be string[].

No comments:

Popular Posts