|
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
namespace WFrmAppIOC
{
class LogFile
{
public static void WriteError(string location, string Message)
{
string obuf;
FileInfo f = new FileInfo("DBErrorLog.txt");
StreamWriter w = f.AppendText();
obuf = string.Format("Error from {0}, Message = {1}", location, Message);
w.WriteLine(obuf);
w.Close();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a Director of Engineering, have an MBA and work in C# forms, Asp.Net and vb.net. I have been writing Windows program since windows 3.0. I am currently working in the Healthcare industry.
I enjoy reading, music (most types), and learning new technology. I am involved in opensource projects at codeplex.
My linkedin link is
http://www.linkedin.com/in/donsweitzer