Consider the following code. 

```
List<MyFiles> files = new List<MyFiles>();
....
while (reader.Read())
{
    var a = new MyFiles
    {
       FileName = reader["Filename"].ToString(),
       FileLocation = reader["Filelocation"].ToString(),
       FullPath = FileLocation + @"\" + FileName // Error at this line
    };
   files.Add(a);
}

```

The above is a snippet from my method which uses `SqlDataReader` to fetch data from the database. Everything works fine expect when I try to assign value to `FullPath` property I get the following error message:

> 
> An object reference is required for the non-static field, method, or property 'MyFiles.FileLocation'
>  An object reference is required for the non-static field, method, or property 'MyFiles.FileName' 
> 
> 
> 

I know I can make those properties static or create an instance and access them via e.g. `var b = new MyFiles(); b.FileLocation ..` 

But my question is why can't I use `FileLocation` and `FileName` as I am in the above code snippet. Is there something I'm missing?