title: Is it possible to assign a ReadOnly variable in a child class?
body: <p><br />
  Suppose I have this parent class:</p>
  
  <pre><code>Public MustInherit Class Parent
  
       ' ReadOnly instance variables:
       Protected ReadOnly str1 As String
       Protected ReadOnly str2 As String
       Protected ReadOnly str3 As String
  
       ' constructor:
       Public Sub New()
       End Sub
  End Class
  </code></pre>
  
  <p><br /><br />
  I want to assign these variables in a child class' constructor, and I want them to be <code>ReadOnly</code> so they cannot be changed once assigned, like this:</p>
  
  <pre><code>Public Class Child
       Inherits Parent
  
       ' constructor:
       Public Sub New()
            MyBase.New()
  
            ' can't assign the ReadOnly variables here!
            ' compile error:  'ReadOnly' variable cannot be the target of an assignment
            Me.str1 = "asdf"
            Me.str2 = "qwerty"
            Me.str3 = "foobar"
       End Sub
  End Class
  </code></pre>
  
  <p><br /><br />
  How can I do this? If it's not possible, why not?
  <br /></p>