error in my prog with VS 2005 C#

A

Andrey Koptyaev

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?
 
J

JS

You need to put your class into a namespace

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top