Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,156,462 members, 7,830,309 topics. Date: Thursday, 16 May 2024 at 07:32 PM

Why We Don't Include Main() In Namespace Definition? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Why We Don't Include Main() In Namespace Definition? (724 Views)

Embedded System Tutorial #include<module2.h> :what Is A Microcontroller? / Embedded System Tutorial For Beginners: #include<module1.h> / Definition Of Frontend And Backend Softwares (2) (3) (4)

(1) (Reply) (Go Down)

Why We Don't Include Main() In Namespace Definition? by Rink: 10:46pm On Aug 20, 2010
Why we don't include Main() in namespace definition? If we use Main() in namespace then will that cause any error?
Re: Why We Don't Include Main() In Namespace Definition? by Kobojunkie: 11:17pm On Aug 20, 2010
Why would you want to include main() in namespace declaration? What do you understand Namespace to mean?
Re: Why We Don't Include Main() In Namespace Definition? by Rink: 11:53pm On Aug 20, 2010
A namespace contains similar type of classes as its members.
I am new to c# programming. Just for practice I created a new namespace and when I complied it I got entry point error I believe it was because of Main() and then this question occured to me.
Please explain.
Re: Why We Don't Include Main() In Namespace Definition? by Beaf: 11:20pm On Aug 21, 2010
Rink:

A namespace contains similar type of classes as its members.
I am new to c# programming. Just for practice I created a new namespace and when I complied it I got entry point error I believe it was because of Main() and then this question occured to me.
Please explain.

In Windows applications and console apps, Main() is reserved as the entry point. That is where all startup point for your entire application.

(1) (Reply)

Nodefault A Command, But Dodefault() / Unwanted Error Message / Translator Software

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 40
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.