When is a ReadOnly Variable allocated?
<p>An online test has this question:</p>

<p>Features of Read Only Variable:</p>

<ol>
<li>It is allocated at compile time</li>
<li>Declaration and initialization is separated</li>
<li>It is allocated at runtime</li>
<li>All of these</li>
</ol>

<p>The test gave the answer as 4. I get 2 and 3 but not sure about 1. Would this be an example of when the answer of 1 could occur:</p>

<pre><code>private readonly int readonlyExample = 10;
</code></pre>

<p>Note: I would normally use a const for the example above</p>
