What is the optimal way to return a private value from inside a class? : <p>I'm attempting to optimize my code for maximum readability and for that I need my code to be in-line through and through. I will present two snippets of code as an example. In my eyes the below one is more easier for the eyes. These snippets (one of them) would be stored in a class and setting <em>width</em> should only be possible inside the class while getting <em>Width</em> should always be possible.</p>

<p><strong>A:</strong></p>

<pre><code>private int width;
public int Width
{
    get { return width; }
    private set { }
}
</code></pre>

<p><strong>B:</strong></p>

<pre><code>private int width;
public int Width()
{
    return width;
}
</code></pre>

<p>As far as I am concerned these two ways of achieving the same end result are identical. Because I would like to be thoroughly in-line in all my classes I wouldn't want to use both ways mixed together. The B-approach seems cleaner in my eyes.</p>

<p><strong>Are there any downsides/upsides to either approach. Should one approach be favored over the other? Are A and B approaches really completely identical?</strong></p>
