title: Set minimum window size in C# .NET
body: <p>I am having trouble setting the minimum size of my window in a C# application I am working on.  I have tried this code in the form's constructor:</p>
  
  <pre><code>this.MinimumSize.Width = 800;
  this.MinimumSize.Height = 600;
  </code></pre>
  
  <p>But the compiler says:</p>
  
  <blockquote>
    <p>Cannot modify the return value of
    'System.Windows.Forms.Control.MinimumSize' because it is not a variable</p>
  </blockquote>
  
  <p>Can anybody shed some light on this issue for me?</p>
  
  <p>EDIT:</p>
  
  <p>Using:</p>
  
  <pre><code>this.MinimumSize = new Size(800,600);
  </code></pre>
  
  <p>Gives:</p>
  
  <pre><code> error CS0118: 'System.Windows.Forms.Form.Size' is a 'property' but is used like a 'type'
  </code></pre>
  
  <p>Sorry I forgot to mention that I had already tried that.
  Also forgot to mention that I am not using Visual Studio.</p>