This question has probably been answered hundreds of times, but here goes.

I have this chunck of code:

```
private void PopulateStringDropdownList(List<ObjectInfo> listObject,
                                        object selectedType = null)
{
    List<string> listString = listObject.OrderBy(x => x.m_Type).ToString();
    for (int i = 0; i < listString .Count; i++)
    {
        for (int j = i + 1; j < listString .Count; j++)
        { 
            if (String.Equals(listString [i], listString [j]))
            {
                listString.RemoveAt(j);
            }
        }
    }
    ViewBag.property1 = new SelectList(listString );
}

```

So basically I'm trying to populate a dropdown List with strings coming from a property of each objects contained in the list I pass in parameter.

But the code doesn't compile because of the error you're seeing up there, and I've yet to understand why exactly. Any help anyone?