Bonjour j'ai un grand probléme pour créer un dossier
j'ai taper le code suivante que j'ai trouver dans le
MSDN de Visual Studioi.net en c#:
// Specify the directory you want to manipulate.
string path = @"c:\MyDir";
try
{
// Determine whether the directory exists.
if (Directory.Exists(path))
{
Console.WriteLine("That path exists
already.");
return;
}
// Try to create the directory.
DirectoryInfo di =
Directory.CreateDirectory(path);
Console.WriteLine("The directory was created
successfully at {0}.", Directory.GetCreationTime(path));
// Delete the directory.
di.Delete();
Console.WriteLine("The directory was deleted
successfully.");
}
catch (Exception e)
{
Console.WriteLine("The process failed: {0}",
e.ToString());
}
finally {}
}
Mais le dossier ne se crée pas je n'arrive pas a
comprednre pourquoi ??
Ce code je l'ai intégrer dans mon service web fichier
(*.asmx.cs) je ne voit pas pourquoi ca ne marche pas il
ne m'affiche aucune erreur : pour le path j'ai aussi
essayer ( string path = @"c:\\MyDir";) car j'ai vu ca
dans ce forum ...et j'ai ajputer l'espace de nom
(System.IO)
MERCI de m'aider