Question: I'm trying to learn C# by watching tutorials and when I try to rename my class it gives me this

So this first error is basically when I make a new console solution and then declare a class and give it a name and then try to write out to the console it gives me two errors.

> 
> ![1ST:Error 1 Invalid token '(' in class, struct, or interface member
>  declaration C:\Users\Alan\AppData\Local\Temporary
>  Projects\ConsoleApplication1\Program.cs 10 23 ConsoleApplication1
> 
> 
> 2ND : Error 2 The type name 'Writeline' does not exist in the type
>  'System.Console' C:\Users\Alan\AppData\Local\Temporary
>  Projects\ConsoleApplication1\Program.cs 10 13 ConsoleApplication1
> 
> 
> 

I clicked an save all and saved it to a folder on my desktop where I plan to put all my C# files but I get those errors and when I start out a new document clean it and write the console commands and build it doesnt give me any errors. 

Is it that I need a constructor or that I need to save my files in a specific order or what?.
][1](http://i.stack.imgur.com/vOtcl.jpg)

Answer: 
Anthony Pegram’s answer is correct. Adding the directive `using System;` at the top of any relative c# files, allows the compiler to omit the need to have the **System.** portion of the method namespace in front of `System.Console.WriteLine()`. 

However, if the console solution is named **TestSolution** and the console application project has the namespace **TestSolution.Console**; the **System.** declaration in front of `System.Console.WriteLine()` calls will still be needed. 

This is due to ambiguity in the compiler as to the **Console** portion ending in the namespace. A console project named **TestSolution.TestConsole**, will not run into the namespace collision, unless the name of the class being written is **Console**. 

Watch for potential naming collisions for namespaces, when building and naming libraries for .NET applications.
You have a couple of issues.

Firstly, you are trying to call Console.WriteLine() in an invalid part of the file. You need to declare a `Method` or `Constructor` and place this call inside that.

Constructor example:

```
public class Person
{
    public Person()
    {
        Console.WriteLine("Hello");
    }
}

```

Method example:

```
public class Person
{
    public void SayHello()
    {
        Console.WriteLine("Hello");
    }
}

```

Your other issues is that you have the capitalization of 'WriteLine' incorrect.

The code should read:

`Console.WriteLine("Test");`

<http://msdn.microsoft.com/en-us/library/system.console.writeline.aspx>