Immutability and collections : <p>Hello I've got a questation, is this bad approach to immutability? And if it is, why? I mean for me if you adding or removing items to or from collection, you are not changing the state of the object, it still has one and the same collection. It doesn't really matter how many and if collection has items when you itterating it. When you ask for it, you will get allways different reference which you can not modify. If this is bad practice where are pros in using immutable collections?</p>

<p>Thank you!</p>

<pre><code>using System;
using System.Collections.Generic;

class Test
{
    private readonly List&lt;object&gt; items;

    public object[] Items { get { return this.items.ToArray(); } }

    public Test(params object[] items)
    {
        this.items = new List&lt;object&gt;();
        this.items.AddRange(items);
    }

    public void AddItem(object item)
    {
        this.items.Add(item);
    }
}
</code></pre>
