I want to create a log folder in this location C:\Users\administrator\Documents i tried this code but below code not able to create directory in that location. program not throwing error but not able to create folder in Documents folder. i tried this code
LogPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Log";
if (!Directory.Exists(LogPath))
{
Directory.CreateDirectory(LogPath);
}
where i made the mistake for which log folder not creating in document folder?
please share the right code. thanks