1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
   |  string iptemp, nomtemp;
 
      int finnom = 1;    //derniere partie du nom de machine (chiffre)    
        else if (comboBoxOS.Text == "Linux")
           {
               finnom = 1;
 
               do
               {
 
                   nomtemp = "LNX" + usage + "99" + comboBoxPLLin.Text;
 
                   if (finnom < 10)//pour avoir 4 chiffres apres la lettre
                   {
                       nomtemp += "000" + finnom;
                   }
                   else if (finnom < 100)//pour avoir 4 chiffres apres la lettre
                   {
                       nomtemp += "00" + finnom;
                   }
                   else if (finnom < 1000)//pour avoir 4 chiffres apres la lettre
                   {
                       nomtemp += "0" + finnom;
                   }
 
                   finnom++;
 
               } while (!Program.Metier.HostnameDispo(nomtemp)); | 
Partager