Hi , I have write this code for write error message in .txt file and this code is working fine.
void writeToLogFile(string logMessage)
{
string strLogMessage = string.Empty;
string strLogFile = System.Configuration.ConfigurationManager.AppSettings["logFilePath"].ToString();
StreamWriter swLog;
strLogMessage = string.Format("{0}: {1}", DateTime.Now, logMessage);
if (!File.Exists(strLogFile))
{
swLog = new StreamWriter(strLogFile);
}
else
{
swLog = File.AppendText(strLogFile);
}
swLog.WriteLine(strLogMessage);
swLog.WriteLine();
swLog.Close();
}
I want to know is this an example of binary serialization?
If
YES then please inform me from which line the serialization is done?
If
NO then please tell me an example of Binary Serialization ?