is it possible to create immutable object without passing everything in constructor?
<p>I want to make my class immutable. Obvious way would be to declare all fields as <code>get; private set;</code> and to initialize all fields in constructor. So clients must provide everything in constructor. The problem is that when there are ~10 or more fields passing them in constructor become very unreadable, because there are no labels for each field.</p>

<p>For example this is pretty readable:</p>

<pre><code>info = new StockInfo
        {
            Name = data[0] as string,
            Status = s,
            LotSize = (int)data[1],
            ISIN = data[2] as string,
            MinStep = (decimal)data[3]
        };
</code></pre>

<p>compare to this:</p>

<pre><code>new StockInfo(data[0] as string, s, (int) data[1], data[2] as string, (decimal) data[3])
</code></pre>

<p>And now imaging that I have 10 or more parameters.</p>

<p>So how can I make class immutable saving readability?</p>

<p>I can suggest only use the same formatting when using constructor:</p>

<pre><code>info = new StockInfo(
            data[0] as string,           // Name
            s,                           // Status
            (int)data[1],                // LotSize
            data[2] as string,           // ISIN
            (decimal)data[3]             // MinStep
       );
</code></pre>

<p>Can you suggest something better?</p>
