Try the following C# program :

using System;
using System.Collections.Generic;

class Program
{
   static void Main()
   {
      int max = 999999;
      List primes = GetPrimes(max); // get all 6 digit primes
      Console.WriteLine("The circular primes under {0} are:\n", max + 1); 
  
      foreach(int prime in primes)
      {
         if(CantBeCircular(prime)) continue;
         int next = prime;  
         bool isCircular = true;

         while(true)
         {
            next = Rotate(next);
            if (next == prime) break;
            if (!primes.Contains(next))
            {
               isCircular = false;
               break;
            } 
         }
 
         if(isCircular) Console.WriteLine(prime);
      } 

      Console.ReadKey(); 
   }

   static List GetPrimes(int max)
   {
      // uses Sieve of Eratosthenes algorithm
      List primes = new List();
      if (max < 2) return primes;

      bool[] isntPrime = new bool[max + 1]; // all false by default
      int final = (int)Math.Sqrt(max);

      for(int i = 2; i <= final; i++)
      {
         if(!isntPrime[i]) 
         {
            for(int j = i * i; j <= max; j += i) isntPrime[j] = true;
         }
      }
      
      for(int i = 2; i <= max ; i++)
      {
         if(!isntPrime[i]) primes.Add(i);
      }       

       return primes;
    }

    static bool CantBeCircular(int number)
    {
      // if number contains at least one digit which is even or 5 then it can't be circular
      // the only exceptions to this are the numbers 2 and 5 themselves

      if (number == 2 || number == 5) return false;

      while (number > 0)
      {
         int digit = number % 10;
         if (digit % 2 == 0 || digit == 5) return true;
         number /= 10;
      }

      return false;
    }

    static int Rotate(int number)
    {
       if (number < 10) return number;

       int total = 0; 
       int multiplier = 10;

       while (number > 9)
       {
          total += (number % 10) * multiplier;
          multiplier *= 10; 
          number /= 10;
       }

       total += number % 10;
       return total;
    } 
}