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

error in my prog with VS 2005 C#

P: n/a
I try to buid little prog from Shildt book but error.VS 2005
Here:
using System;
class Example
{
public static void Main()
{
Console.WriteLine("Simple C# program");
}
}
In VS 2005 error: The namespace '<global namespace>' already contains a

definition for 'Example'

What I must improve?

Sep 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
JS
You need to put your class into a namespace

using System;
namespace Test
{
class Example
{
....
}
}

Sep 24 '06 #2

P: n/a
.... or rename the class.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"JS" <jn*********@gmail.comwrote in message
news:11*********************@d34g2000cwd.googlegro ups.com...
You need to put your class into a namespace

using System;
namespace Test
{
class Example
{
...
}
}

Sep 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.