title: C# - Converting a 'System.Drawing.Size' Element to an Integer(s)
body: <p>I'm working with .NET forms in Visual C#.
  I've created a label dynamically, which shows upon a button click. This all works fine; what I'm trying to do is position it so that the element is at the centre of the form. Normally, I'd just set it to half the form size, minus half the element size, but of course this won't work as I am setting the text programmatically also.</p>
  
  <p>My code for the label is as follows:</p>
  
  <pre><code>if(part == 1){
          theLabel.Text = "Choose a name for your character!";
  }
  theLabel.ForeColor = Color.DarkGray;
  theLabel.Font = new Font("Arial", 14, FontStyle.Bold);
  
  theLabel.Location = new Point();
  </code></pre>
  
  <p>I've tried many things here, but I just cannot think of a way. I've tried <code>int[] sizes = (int)theLabel.Size</code> and various other but I just cannot get this to work. Is there another way to line this element to the middle?</p>