title: Simplify an if statement with a method C#
body: <p>I was wondering if there is any possible way to simplify this.</p>
  <pre><code>if (string != &quot;&quot;)
  {
     dataGridView1.Rows.Add(string);
  }
  </code></pre>
  <p>All I can find is how to shorten if statements which return a value, not execute a method like mine.</p>