Agregar archivos de proyecto.
This commit is contained in:
22
Utilidades.cs
Normal file
22
Utilidades.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace tsCorreos
|
||||
{
|
||||
internal class Utilidades
|
||||
{
|
||||
public static string ObtieneDirectorioAleatorio()
|
||||
{
|
||||
string sDir = System.IO.Path.GetTempPath() + System.IO.Path.GetRandomFileName();
|
||||
|
||||
while (System.IO.Directory.Exists(sDir))
|
||||
{
|
||||
sDir = System.IO.Path.GetTempPath() + "\\" + System.IO.Path.GetRandomFileName();
|
||||
}
|
||||
|
||||
System.IO.Directory.CreateDirectory(sDir);
|
||||
return sDir;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user