¿Cómo obtener una ruta al escritorio para el usuario actual en C#?
¿Cómo obtengo una ruta al escritorio para el usuario actual en C#?
Lo único que pude encontrar fue la clase VB. NET-onlySpecialDirectories
, que tiene esta propiedad:
My.Computer.FileSystem.SpecialDirectories.Desktop
¿Cómo puedo hacer esto en C#?
282
Author: Peter Mortensen, 2009-03-11
2 answers
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
637
Author: Marc Gravell,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-03-11 11:25:21
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-03-11 11:25:21
string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string extension = ".log";
filePath += @"\Error Log\" + extension;
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
19
Author: bipin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-05 08:32:13
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-05 08:32:13