Click here to Skip to main content
11,437,397 members (34,575 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
as in JAVA we can run a programme without main()
ex
class MainMethodNot
{
static
{
System.out.println(“This java program have run without the run method”);
System.exit(0);
}
}


IS this is possible in c# ? programe without Main()
Posted 15-Jan-13 22:07pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

HI,

Main() is the begining or the starting point of the execution. If the main() will be missing then The compilor compiler will not get a place to start from and will through error.

Thanks
  Permalink  
v2
Comments
siddharth629 at 16-Jan-13 3:25am
   
sir,
means in C# IT IS NOT POSSIBLE, BUT in java it could work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100