I would like that the method has a specfic return type, but somehow I cannot make it work.

I have an XML structure:

```
<Notifications>
   <Alerts>
      <Max>3<Max/>
      <Med>2<Med/>
      <Min>1<Min/>
   </Alerts>
</Notifications>

```

I would like to get out the values of `Max`, `Med`, `Min`. But the main point is I DO NOT want any foreach loops at all, I only want that the method has a List<string> return type, or even better to make a generic return type.

The point is, I don't have any custom class (and I don't want to have it) that I would fill its properties.

This is what I have some far, but I got an error on the "List()" annonymus method:

```
Here it returns:
List<string> items = GetAlerts();

//method to read:
public List<string> GetAlerts()
{
    return xmlDoc1.Descendants("Notifications").Elements("Alerts").Select(s => new
    {
        MAX = s.Element("Max").Value,
        MED = s.Element("Med").Value,
        MIN = s.Element("Min").Value
     }).ToList(); //error on this line
}

```

----------
----------

---

And how would it look that this method about would be a generic return type? This is NOT OK:

```
Here it returns: 
List<object> items = setBLL2.GetAlert<List<object>>();

public T GetAlert<T>() where T:class
{
    return (T)xmlDoc1.Descendants("Notifications").Elements("Alerts").Select(s => new
    //ERROR up here before (T
    {
         MAX = s.Element("Max").Value,
         MED = s.Element("Med").Value,
         MIN = s.Element("Min").Value
     }).ToList();
}

```

The error message is: 

> 
> Cannot convert type 'System.Collections.Generic.List' to 'T'
> 
> 
>