EDN Admin
Well-known member
<p align=left><font face=Arial size=2></font>
Hi All,
<p align=left>
<p align=left>I am trying to understand why in C# the entry point function
<p align=left>
<p align=left>
<div class=codeseg>
<div class=codecontent>
<div class=codesniptitle><span style="width:100% Code Snippet
<p align=left>static void Main(string[] args)
<p align=left>
<p align=left>
is not explicitly declared as "public" . As the default access specifier for any method in a class is "private", the above declaration would make the entry point function "Main" as a private method.
<p align=left>
<p align=left>My question is , if the "Main" method is private how is the runtime going to invoke this static function ?? . Please enlighten if I am missing something.
<p align=left>
<p align=left>Thanks a million in advance
<p align=left>
<p align=left>Cheers
<p align=left>Kodez
View the full article
Hi All,
<p align=left>
<p align=left>I am trying to understand why in C# the entry point function
<p align=left>
<p align=left>
<div class=codeseg>
<div class=codecontent>
<div class=codesniptitle><span style="width:100% Code Snippet
<p align=left>static void Main(string[] args)
<p align=left>
<p align=left>
is not explicitly declared as "public" . As the default access specifier for any method in a class is "private", the above declaration would make the entry point function "Main" as a private method.
<p align=left>
<p align=left>My question is , if the "Main" method is private how is the runtime going to invoke this static function ?? . Please enlighten if I am missing something.
<p align=left>
<p align=left>Thanks a million in advance
<p align=left>
<p align=left>Cheers
<p align=left>Kodez
View the full article