If I have a class that contains, for example, a List and I want other classes to be able to see the list but not set it, I can declare
Return IEnumerable, which is immutable. The getter should look like this:
IEnumerable
public IEnumerable SomeList { get { foreach(string s in someList) yield return s; // excuse my inline style here, zealots yield break; } }