title: Any ways to swap variables within if-statement better than this?
body: <p>I'm writing a small C# console app, and I was wondering if there are ways to improve this part of code (particullary how to make it comply with the principle "Don't repeat yourself"). My app works fine with this construction too, but I don't like how it looks like.</p>
  
  <pre><code>if (rows % 2 == 0)
  {
      evenCell = '#';
      oddCell = '.';
  }
  else
  {
      evenCell = '.';
      oddCell = '#';
  }
  </code></pre>