using System;
using System.IO;
namespace LoggerAplication
{
class Logger
{
public static void Write(string nameFile, string text)
{
StreamWriter myFile;
myFile = File.AppendText(nameFile);
myFile.WriteLine(DateTime.Now + " - " + text);
myFile.Close();
}
}
}
using System;
namespace LoggerAplication
{
class Program
{
static void Main()
{
Logger.Write("text.txt", "Hola");
}
}
}