title: WriteOnly Property or Method?
body: <p>Is there a particular scenario where a <code>WriteOnly</code> property makes more sense then a method? The method approach feels much more natural to me. </p>
  
  <p>What is the right approach?</p>
  
  <p><strong>Using Properties</strong>:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Public WriteOnly Property MyProperty As String
     Set(ByVal value as String)
        m_myField = value
     End Set
  End Property
  </code></pre>
  
  <pre class="lang-cs prettyprint-override"><code>public string MyProperty
  {
     set{ m_myField = value;}
  }
  </code></pre>
  
  <p><strong>Using Methods</strong>:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Public Sub SetMyProperty(ByVal value as String)
     m_myField = value
  End Sub
  </code></pre>
  
  <pre class="lang-cs prettyprint-override"><code>public void SetMyProperty(string value)
  {
     m_myField = value;
  }
  </code></pre>
  
  <p><strong>EDIT</strong>
  Just to clarify I am referring to "WriteOnly" properties.</p>