error in my prog with VS 2005 C#

  • Thread starter Thread starter Andrey Koptyaev
  • Start date Start date
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?
 
You need to put your class into a namespace

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