comment puis-je faire une boucle infinie avec 5 secondes de pauses

    string connectionstring = "server =SQLVS2\\SQLVS2;database=DDM;Persist Security Info=True;uid=ddmuser;password=User02+Ddm;";
    SqlConnection myConnection = new SqlConnection(connectionstring);
    SqlCommand myCommand = new SqlCommand("GetNullHash", myConnection);
    myCommand.CommandType = CommandType.StoredProcedure;
    myConnection.Open();
    SqlDataReader rdr = myCommand.ExecuteReader();

   while (rdr.Read())
    {
        string filename = @"\\" + rdr.GetString(3);
        filename = System.IO.Path.Combine(filename, rdr.GetString(2));
        filename = System.IO.Path.Combine(filename, rdr.GetString(1));
        computeHashh1 abc = new computeHashh1();
        Console.WriteLine(abc.computeHash(filename));          
        inserthash insert = new inserthash();
       insert.InsertHash(rdr.GetString(1), abc.computeHash(filename), rdr.GetStr(2),rdr.GetString(3));

    }

comment puis-je faire cette boucle exécuter une fois dans les 5 secondes pour toujours ou jusqu'à l'arrêt.

InformationsquelleAutor paxcow | 2012-07-24