[学习公共库]Error类 |
麦林 发表于 2007/5/31 21:49:23 | using System;using System.Diagnostics;
/// <summary>/// Error 的摘要说明/// </summary>public class Error{ const string EVENT_LOG_SOURCE = ".YOHANDS";
public static void Log(string message) { EventLog m_eventLog = null;
if (!(EventLog.SourceExists(EVENT_LOG_SOURCE))) { EventLog.CreateEventSource(EVENT_LOG_SOURCE,"Application"); } if (m_eventLog == null) { m_eventLog = new EventLog("Application"); m_eventLog.Source = EVENT_LOG_SOURCE; } m_eventLog.WriteEntry(message,System.Diagnostics.EventLogEntryType.Error); }}
|
|
回复:Error类 |
烟雨朦胧发表评论于2007/6/1 18:51:56 | 晕
|
|
» 1 »
|

.: 公告
|
« | September 2025 | » | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | |
|
.: 我的分类(专题)
|

.: 最新日志
.: 最新回复
|

blog名称:栗色?蓝色? 日志总数:449 评论数量:201 留言数量:37 访问次数:2262471 建立时间:2006年5月16日 |
|

.: 留言板
|

.: 链接
|

|