title: How to improve this C# code to count holes in numbers?
body: <p>I want to solve this puzzle with a more elegant code in C#.</p>
  
  <pre><code>using System;
  
  public class Program
  {
      public static void Main()
      {
          int numero = 12345678;
          int check = CountHoles(numero);
          Console.WriteLine(check);   
      }
  
      public static int CountHoles(int num){
          int roles = 0;
          for (int i=0; i &lt; num.ToString().Length; i++ ){
              string ver = "";                
              ver = num.ToString().Substring(i,1);                
              if (ver.Contains("0") || ver.Contains("4") || ver.Contains("6") || ver.Contains("9")){
                  roles++;
              }               
              if (ver.Contains("8")){
                  roles = roles+2;
              }
          }       
          return roles;       
      }
  }
  </code></pre>
  
  <p>.Net Fiddle: <a href="https://dotnetfiddle.net/3s8ucy" rel="nofollow">https://dotnetfiddle.net/3s8ucy</a></p>
  
  <p>Thanks :)</p>