title: Get screen resolution in console app
body: <p>How can I get screen resolution in console app (if it's possible)?</p>
  
  <p>While in <code>Forms</code> I can use:</p>
  
  <pre><code>int height = Screen.PrimaryScreen.Bounds.Height;
  int width = Screen.PrimaryScreen.Bounds.Width;
  </code></pre>
  
  <p>but I'm looking specifically console way.</p>
  
  <hr>
  
  <p>So the way to solve my problem was proposed by <a href="https://stackoverflow.com/users/7931456/marc-antoine-jutras">Marc-Antoine Jutras</a>. I need <code>int</code> values so I went like this:</p>
  
  <pre><code>    int height = Convert.ToInt32(SystemParameters.PrimaryScreenHeight);
      int width = Convert.ToInt32(SystemParameters.PrimaryScreenWidth);
  </code></pre>