Question: Can anyone please tell me the reason that why we can't use **Console.WriteLine** in Class without Method. I am trying to do this but complier is putting a error. I know its wrong but just want to know the valid reason for that .

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

```

Answer: 
A method is a code block that contains a series of statements. A program causes the statements to be executed by calling the method and specifying any required method arguments. In C#, every executed instruction is performed in the context of a method.

Therefore must be written inside of a method. otherwise CLR don't know when it is supposed to execute that code. This is basic for C#.
Class encapsulates constructors, functions, fields and properties. Accordingly, you can only write any code statement in a function or constructor.