Is using YIELD a read-only way to return a collection?
- by Eric
I'm writing an interface which has a collection property which I want to be read only. I don't want users of the interface to be able to modify the collection. The typical suggestion I've found for creating a read only collection property is to set the type of the property to IEnumerable like this:
private List<string> _mylist;
public…