moleishiwoa
moleishiwoa
2017-10-18 07:48

C# ListView如何记录动态日志

  • c#
  • list

主程序里有标志位,标志位置1时,会调用Writelog();
private void WriteLog(String msg)
{

             ListViewItem item = new ListViewItem();
             item = listView1.Items.Add(DateTime.Now.ToString("yyyy_MM_dd"));
             item.SubItems.Add(DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss"));
             item.SubItems.Add(msg);





     }

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答