Suppose you have a class Person :
public class Person
{
public string Name { get; set;}
public IEnumerable Roles {get; set;}
}
The problem with your approach is that you can't add any items to the collection - I would have a private structure like list and then expose the items as an Enumerable:
public class Person
{
private IList _roles;
public Person()
{
this._roles = new List();
}
public string Name { get; set; }
public void AddRole(Role role)
{
//implementation
}
public IEnumerable Roles
{
get { return this._roles.AsEnumerable(); }
}
}
If you intend some other class to create the list of roles (which I wouldn't recommend) then I wouldn't initialise the enumerable at all in Person.