?? systemerror.cs
字號:
using System;
using System.IO;
namespace GUCAS.SC.SqlHelper
{
/// <summary>
/// 錯誤處理函數(shù),用于記錄錯誤日志
/// </summary>
public class SystemError
{
//記錄錯誤日志位置
private static string fileName = "c:\\Systemlog.txt";
public static String FileName
{
get
{
return(fileName);
}
set
{
if(value != null || value != "")
{
fileName = value;
}
}
}
/// <summary>
/// 記錄日志至文本文件
/// </summary>
/// <param name="message">記錄的內(nèi)容</param>
public static void SystemLog(string message)
{
// if(File.Exists(m_fileName))
// {
// ///如果日志文件已經(jīng)存在,則直接寫入日志文件
// StreamWriter sr = File.AppendText(FileName);
// sr.WriteLine ("\n");
// sr.WriteLine (DateTime.Now.ToString()+message);
// sr.Close();
// }
// else
// {
// ///創(chuàng)建日志文件
// StreamWriter sr = File.CreateText(FileName);
// sr.Close();
// }
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -