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: 
Class encapsulates constructors, functions, fields and properties. Accordingly, you can only write any code statement in a function or constructor.
Because `Console.WriteLine("");` can't be (or) is not a member field for the said class `AssemblyOneClass2`.

To say little more; You define member field (Data member and Methods) while defining class in order to give some behavior to that class and what all action it can perform.

For example: `Student` class having `Name` and `City` property

```
Class student
{
  public string Name {get;set;}
  public string City {get;set;}
}

```

Just by having a call to `Writeline()` method in your class; what behavior you are defining, you think?

Even if you, keep the class declaration empty saying below, it still make little sense saying that; no behavior to the class have been defined yet and it's just kind a stub right now.

```
 public  class AssemblyOneClass2
    {

    }

```