By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,054 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,054 IT Pros & Developers. It's quick & easy.

Different Entry Point

P: n/a
Is is possible to define a different entry point than Main?
i.e.
[STAThread]

static void MainEntryPoint()

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(fals e);

Application.Run(new MainForm());

}

Or is it hard coded so you have to use Main?

(BTW, I'm in VS.net)

Thanks,

Jon
Sep 27 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Jon,

You can change the startup object in the properties window for your project, however I don't think you can change the method name
from Main.

What are you trying to accomplish by changing the Main method's name?

--
Dave Sexton

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message news:12*************@corp.supernews.com...
Is is possible to define a different entry point than Main?
i.e.
[STAThread]

static void MainEntryPoint()

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(fals e);

Application.Run(new MainForm());

}

Or is it hard coded so you have to use Main?

(BTW, I'm in VS.net)

Thanks,

Jon


Sep 28 '06 #2

P: n/a

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OJ**************@TK2MSFTNGP03.phx.gbl...
Hi Jon,

You can change the startup object in the properties window for your
project, however I don't think you can change the method name from Main.

What are you trying to accomplish by changing the Main method's name?
I just wanted to call my class main instead of program ;/ Not a big deal but
was just curious if I could.
Sep 28 '06 #3

P: n/a
Jon Slaughter wrote:
You can change the startup object in the properties window for your
project, however I don't think you can change the method name from Main.

What are you trying to accomplish by changing the Main method's name?

I just wanted to call my class main instead of program ;/ Not a big deal but
was just curious if I could.
I've taken to calling the entry point class EntryPoint which then
doesn't conflict with Main. Just an idea :)

Jon

Sep 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.