代码
StringBuilder sb
=
new
StringBuilder();
EventLog mylog = new EventLog();
mylog.Log = " Application " ; // System[系统日志] | Application[应用日志] | Security[安全日志]
EventLogEntryCollection myCollection = mylog.Entries;
for ( int i = 0 ; i < myCollection.Count; i ++ )
{
sb.Append( " Time: " + myCollection[i].TimeGenerated + " " +
myCollection[i].Message + " <br /> " );
}
EventLog mylog = new EventLog();
mylog.Log = " Application " ; // System[系统日志] | Application[应用日志] | Security[安全日志]
EventLogEntryCollection myCollection = mylog.Entries;
for ( int i = 0 ; i < myCollection.Count; i ++ )
{
sb.Append( " Time: " + myCollection[i].TimeGenerated + " " +
myCollection[i].Message + " <br /> " );
}
如果本文对你有所帮助,请打赏——1元就足够感动我:)
联系邮箱:intdb@qq.com
我的GitHub: https://github.com/vipstone
联系邮箱:intdb@qq.com
我的GitHub: https://github.com/vipstone
关注公众号:
作者: 王磊
出处: http://vipstone.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,请标明出处。