title: How to use MOD function in C#
body: <p>I've got this code writted on VB.NET and I want to transform it to C#</p>
  
  <p>I really dont know how to convert the MOD funciont without any error using %...</p>
  
  <pre><code>For f = 0 To 7
          For c = 0 To 7
  
  
              If (((c Mod 2) &lt;&gt; 0 AndAlso (f Mod 2) = 0) OrElse ((c Mod 2) = 0 AndAlso (f Mod 2) &lt;&gt; 0)) AndAlso f &lt; 3 Then
                  Dim fi As New BE.Ficha
                  fi.Color = 1
                  fi.Fila = f
  
                  fi.Columna = c
                  fi.Dama = False
                  tab.Fichas.Add(fi)
  
              ElseIf (((c Mod 2) = 0 AndAlso (f Mod 2) &lt;&gt; 0) OrElse ((c Mod 2) &lt;&gt; 0 AndAlso (f Mod 2) = 0)) AndAlso f &gt; 4
                  Dim fi As New BE.Ficha
                  fi.Color = -1
                  fi.Fila = f
  
                  fi.Columna = c
                  fi.Dama = False
                  tab.Fichas.Add(fi)
  
              End If
  
  
          Next
  
      Next
  </code></pre>