Help With EventLogs and Csharp RRS feed

  • Question

  • Hi all I am trying to write and event log viewer that I can send the data to an email address...

    I tried this code I found over at another forum and I am not having any luck getting it to print the toList information into something I can use...

                EventLog log = new EventLog("Application");
                var entries = log.Entries.Cast<EventLogEntry>()
                                         .Where(x => x.InstanceId == 4624)
                                         .Select(x => new

    I and going to change the application string to security when I move it over to the server

    and the where clause will change... but when I rem out the where I get information in the select but the program stops after it makes the list... I can't seem to do anything with it..

    Any IDeas? Thanks in advance! 

    Tuesday, May 29, 2018 4:46 PM

All replies