title: What is the more efficient syntax to produce an even number in my console project?
body: <p>I recently started learning c# and learned that there are 2 ways to have my code output even numbers when I write this <code>For loop</code>. I learned the syntax of version 2, which is intuitive to me. However, version 1 was an exampled I found elsewhere online. I want to understand if there is a difference between the two versions.</p>
  
  <pre><code>//Version 1
  for (int num = 0; num &lt; 100; num+=2) 
  {
      Console.WriteLine (num); 
  }
  
  //Version 2
  for (int num = 0; num &lt; 100; num++)
  {
      if (num % 2 == 0)
      {
          Console.WriteLine (num);
      } 
  }
  </code></pre>
  
  <p>Of the two possible ways, is there any difference between the two syntaxes? If yes, which is more efficient and why?</p>