如何使用Visual Studio记录历史记录?使用C# [英] How to do history log using visual studio? using c#

查看:537
本文介绍了如何使用Visual Studio记录历史记录?使用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Visual Studio记录历史记录?使用c#

How to do history log using visual studio? using c#

推荐答案

要进行日志记录,您应该使用现有的库,例如log4net. 请参见此处的简短介绍:
http://shiman.wordpress .com/2008/07/09/how-to-log-in-c-net-with-log4net-a-tutorial/ [
For logging you should use an existing library like log4net.
See here for a short introduction:
http://shiman.wordpress.com/2008/07/09/how-to-log-in-c-net-with-log4net-a-tutorial/[^]


这取决于:您要实现什么?
您可以使用:
1)直文本文件:
That depends: what are you trying to achieve?
You could use:
1) Straight text file:
using (StreamWriter sw = File.AppendText(path))
    {
    sw.WriteLine("This");
    sw.WriteLine("is my");
    sw.WriteLine("history");
    }


2)各种类型的数据库.在这里进行复杂描述的方式取决于您在各种计算机上加载的内容.

告诉我们更多信息,我们可能会提供更多帮助(编辑您的问题,请勿使用添加答案"或提出新问题-然后对此答案发表评论,以便我收到一封电子邮件,表明您已经这样做了)


2) Database of various types. Way to complex to describe here, depends on what you have loaded on the various machines.

Tell us more, and we may be able to help more (Edit your question, don''t use "add answer" or start a new question - then comment on this answer so I get an email to say you have done so)


您可以尝试这个很棒的链接 [
You could try this fantastic link[^]. There is a lot of information available on that link.


这篇关于如何使用Visual Studio记录历史记录?使用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆