Question: I need create an Email List.
For each Folder, I need get all email from owners.
But, I have an error in listRequest.Email = reader["Email"].ToList();
The error is in "ToList()", I'm declaring namespace System.Collections.Generic but don't resolves.

```
public class ListRequest
{
    public List<string> Email { get; set; }
    public string FolderAccess { get; set; }
}

public List<ListRequest> PreencheValores(SqlDataReader reader)
{
    var lista = new List<ListRequest>();
    while (reader.Read())
    {
        var listRequest = new ListRequest();
        listRequest.Email = reader["Email"].ToList();
        listRequest.FolderAccess = reader["FolderAccess"].ToString();
        lista.Add(listRequest);
    }
    return lista;
}

```

Answer: 
Below statement is not valid.

```
listRequest.Email = reader["Email"].ToList();

```

Using SqlDataReader you can read only single element but not list like what you did to retrieve folder access.

```
listRequest.FolderAccess = reader["FolderAccess"].ToString();

```

One thing you could do is retrieve email addresses as comma separated values and then split them. Also consider using string[] instead of List

```
public class ListRequest
{
    public string[] Email { get; set; }
    public string FolderAccess { get; set; }
}

public List<ListRequest> PreencheValores(SqlDataReader reader)
{
    var lista = new List<ListRequest>();
    while (reader.Read())
    {
        var listRequest = new ListRequest();   
        if(reader["Email"] != null)   
          listRequest.Email = reader["Email"].ToString().Split(',');
        if(reader["FolderAccess"] != null)
          listRequest.FolderAccess = reader["FolderAccess"].ToString();
        lista.Add(listRequest);
    }
    return lista;
}

```
reader["Email"] is not a collection. Its gets the value of the specified column in the native format given the column name. 

So do this

```
var lstEmail = new List<string>();
using (connection)
{
    SqlCommand command = new SqlCommand("SELECT Email FROM TableName;",connection);                                                                        
    connection.Open();
    SqlDataReader reader = command.ExecuteReader();

    if (reader.HasRows)
    {
       while (reader.Read())
       {
            lstEmail .add(reader.GetString(0))
       }
    }
    reader.Close();
}

```