Salut,
Je récupère d'un fichier ini un chemin. Si ce dernier comporte un accent Directory.Exists le detecte pas
Si je force comme cela ça marche :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 msPath = ini.GetValue("FOLDER", "DEFAULT"); // si = C:\Documents and Settings\Cédric Name\Mes documents\datas if (!Directory.Exists(msPath)) { //alors on tombe ici MessageBox.Show("Chemin non valide"); msPath = ""; } (...)
Mais comment le faire au niveau de la ligne
Code : Sélectionner tout - Visualiser dans une fenêtre à part msPath=@"C:\Documents and Settings\Cédric Name\Mes documents\datas";
Code : Sélectionner tout - Visualiser dans une fenêtre à part msPath = ini.GetValue("FOLDER", "DEFAULT");![]()
Partager