VB.Net by API/System.Diagnostics/EventLogEntry

Материал из VB Эксперт
Перейти к: навигация, поиск

EventLogEntry.Message

<source lang="vbnet"> Imports System.Diagnostics Module Module1

   Sub Main()
       Dim Log As New EventLog("Application")
       Dim Evt As EventLogEntry
       For Each Evt In Log.Entries
           Console.WriteLine(Evt.Message)
           Console.WriteLine(Evt.TimeGenerated)
           
           Console.WriteLine(Evt.Source)
           
       Next
   End Sub

End Module


 </source>


EventLogEntry.Source

<source lang="vbnet"> Imports System.Diagnostics Module Module1

   Sub Main()
       Dim Log As New EventLog("Application")
       Dim Evt As EventLogEntry
       For Each Evt In Log.Entries
           Console.WriteLine(Evt.Message)
           Console.WriteLine(Evt.TimeGenerated)
           
           Console.WriteLine(Evt.Source)
           
       Next
   End Sub

End Module


 </source>


EventLogEntry.TimeGenerated

<source lang="vbnet">

Imports System.Diagnostics Module Module1

   Sub Main()
       Dim Log As New EventLog("Application")
       Dim Evt As EventLogEntry
       For Each Evt In Log.Entries
           Console.WriteLine(Evt.Message)
           Console.WriteLine(Evt.TimeGenerated)
           
           Console.WriteLine(Evt.Source)
           
       Next
   End Sub

End Module


 </source>