草庐IT

LogDisplayName

全部标签

c# - GetEventLogs() 没有返回设置事件日志?

采用以下C#代码:EventLog[]eventLogs;eventLogs=EventLog.GetEventLogs(computername);foreach(EventLogevtineventLogs){statusMessagesListBox.Items.Add("evt.Log.ToString():"+evt.Log.ToString()+"\t\tevt.LogDisplayName:"+evt.LogDisplayName);}当我运行它时,我的输出如下所示:evt.Log.ToString():Applicationevt.LogDisplayName:Appl