I am working on an issue I do not remember ever having before. I am using VS2012 C#
When i add using System.IO
; to my main program everything works fine
You haven't really given enough code to say for sure, but it sounds like you're probably trying to write "normal code" directly in a class declaration, instead of in a method or property declaration.
Classes can only include declarations - method declarations, field declarations etc. You can't write:
class Foo
{
int i = 10;
Console.WriteLine(i);
}
etc. The first line is valid as it's a variable declaration - the second isn't, as it's just a method call. If you move the code into a method, then it's fine:
class Foo
{
public void Bar()
{
int i = 10;
Console.WriteLine(i);
}
}
Additionally, I'd suggest that you revisit your naming - using the same name for a class and a namespace is a bad idea.