码迷,mamicode.com
首页 > 其他好文 > 详细

向系统日志 写入自定义数据

时间:2019-01-21 21:06:54      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:.so   sharp   .com   img   分享图片   效果   image   tee   csharp   

实现效果:

  技术分享图片

知识运用:

  EventLog类的Source属性和WriteEntry方法

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            EventLog eventlog = new EventLog();
            eventlog.Source = "System";
            eventlog.WriteEntry(textBox1.Text);
        }

  

向系统日志 写入自定义数据

标签:.so   sharp   .com   img   分享图片   效果   image   tee   csharp   

原文地址:https://www.cnblogs.com/feiyucha/p/10300778.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!